Skip to content

Commit 8648154

Browse files
committed
Synced gradle conventions
1 parent 82c8034 commit 8648154

2 files changed

Lines changed: 10 additions & 12 deletions

File tree

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

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

1313
jar {
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")) {
14+
def projectName = rootProject.name
15+
[file("${projectDir}/LICENSE"), file("${rootDir}/LICENSE")].find { it.exists() }?.with { licenseFile ->
16+
from(licenseFile) {
2217
rename { "${it}_${projectName}" }
2318
}
2419
}
2520
}
2621

2722
tasks.withType(JavaCompile).configureEach {
28-
it.options.encoding = "UTF-8"
23+
options.encoding = "UTF-8"
2924
}
3025

3126
tasks.withType(Javadoc).configureEach {
32-
it.options.encoding = "UTF-8"
33-
it.options.addStringOption("Xdoclint:none", "-quiet")
27+
options {
28+
encoding = "UTF-8"
29+
addBooleanOption("Xdoclint:none", true)
30+
quiet()
31+
}
3432
}

buildSrc/src/main/groovy/base.exclude-run-folder.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ plugins {
55
idea {
66
module {
77
["run"].each {
8-
excludeDirs << layout.projectDirectory.file("$it").asFile
8+
excludeDirs += file("${projectDir}/$it")
99
}
1010
}
1111
}

0 commit comments

Comments
 (0)