Skip to content

Commit d3de9c8

Browse files
committed
build.gradle.kts: avoid greedy task configuration
1 parent 165c98d commit d3de9c8

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

build.gradle.kts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ checkstyle {
3333
toolVersion = libs.versions.checkstyle.get()
3434
}
3535

36-
tasks.withType<JavaCompile>().all { // Java compile-time options:
36+
tasks.withType<JavaCompile>().configureEach { // Java compile-time options:
3737
options.compilerArgs.add("-Xdiags:verbose")
3838
if (javaVersion.isCompatibleWith(JavaVersion.VERSION_20)) {
3939
// Suppress warnings that source value 8 is obsolete.
@@ -45,7 +45,7 @@ tasks.withType<JavaCompile>().all { // Java compile-time options:
4545
options.release = 8
4646
}
4747

48-
tasks.withType<JavaExec>().all { // Java runtime options:
48+
tasks.withType<JavaExec>().configureEach { // Java runtime options:
4949
if (isMacOS) {
5050
jvmArgs("-XstartOnFirstThread")
5151
} else {
@@ -63,7 +63,7 @@ tasks.withType<JavaExec>().all { // Java runtime options:
6363
//jvmArgs("-XX:+UseG1GC", "-XX:MaxGCPauseMillis=10")
6464
}
6565

66-
configurations.all {
66+
configurations.configureEach {
6767
resolutionStrategy.cacheChangingModulesFor(0, "seconds") // to disable caching of snapshots
6868
}
6969

0 commit comments

Comments
 (0)