use configureEach
This commit is contained in:
parent
75d5f6b2e6
commit
94fb54f6b8
1 changed files with 4 additions and 4 deletions
|
@ -16,10 +16,10 @@ jar {
|
|||
duplicatesStrategy = DuplicatesStrategy.INCLUDE
|
||||
}
|
||||
|
||||
tasks.withType(JavaCompile) {
|
||||
tasks.withType(JavaCompile).configureEach {
|
||||
doFirst {
|
||||
options.fork = true
|
||||
options.forkOptions.jvmArgs += ['-Duser.language=en','-Duser.country=US']
|
||||
options.forkOptions.jvmArgs += ['-Duser.language=en', '-Duser.country=US']
|
||||
options.encoding = 'UTF-8'
|
||||
options.compilerArgs.add('-Xlint:all')
|
||||
// enforce presence of module-info.java
|
||||
|
@ -29,14 +29,14 @@ tasks.withType(JavaCompile) {
|
|||
}
|
||||
}
|
||||
|
||||
tasks.withType(Javadoc) {
|
||||
tasks.withType(Javadoc).configureEach {
|
||||
doFirst {
|
||||
options.addStringOption('Xdoclint:none', '-quiet')
|
||||
options.encoding = 'UTF-8'
|
||||
}
|
||||
}
|
||||
|
||||
tasks.withType(JavaExec) {
|
||||
tasks.withType(JavaExec).configureEach {
|
||||
doFirst {
|
||||
jvmArguments.add("--module-path")
|
||||
jvmArguments.add(classpath.asPath)
|
||||
|
|
Loading…
Reference in a new issue