Skip to content

Commit ed95bdb

Browse files
committed
Sync gradle scripts between projects
1 parent cf02db1 commit ed95bdb

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

buildSrc/src/main/groovy/base.base-conventions.gradle

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,16 @@ repositories {
1111
}
1212

1313
jar {
14-
var projectName = project.name
15-
from("LICENSE") {
16-
rename { "${it}_${projectName}" }
14+
if (layout.projectDirectory.file("LICENSE").asFile.exists()) {
15+
def projectName = project.name
16+
from(layout.projectDirectory.file("LICENSE")) {
17+
rename { "${it}_${projectName}" }
18+
}
19+
} else if (rootProject.layout.projectDirectory.file("LICENSE").asFile.exists()) {
20+
def projectName = rootProject.name
21+
from(rootProject.layout.projectDirectory.file("LICENSE")) {
22+
rename { "${it}_${projectName}" }
23+
}
1724
}
1825
}
1926

0 commit comments

Comments
 (0)