use configureEach

This commit is contained in:
Jörg Prante 2024-04-05 15:31:06 +02:00
parent 75d5f6b2e6
commit 94fb54f6b8

View file

@ -16,7 +16,7 @@ jar {
duplicatesStrategy = DuplicatesStrategy.INCLUDE
}
tasks.withType(JavaCompile) {
tasks.withType(JavaCompile).configureEach {
doFirst {
options.fork = true
options.forkOptions.jvmArgs += ['-Duser.language=en', '-Duser.country=US']
@ -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)