Skip to content

Commit 3b1eb09

Browse files
Enhance build.gradle
1 parent aceddb4 commit 3b1eb09

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

build.gradle

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -125,15 +125,13 @@ java {
125125
}
126126

127127
// If you plan to use a different file for the license, don't forget to change the file name here!
128-
jar {
129-
from("LICENSE.md") {
130-
rename { "${it}_${archivesBaseName}" }
131-
}
132-
}
128+
["jar", "sourcesJar"].each {
129+
tasks.named(it).configure {
130+
inputs.property "archivesName", project.base.archivesName
133131

134-
sourcesJar {
135-
from("LICENSE.md") {
136-
rename { "${it}_${archivesBaseName}" }
132+
from("LICENSE") {
133+
rename { "${it}_${task.inputs.properties.archivesName}"}
134+
}
137135
}
138136
}
139137

0 commit comments

Comments
 (0)