Skip to content

Commit 96108ee

Browse files
committed
build.gradle.kts: avoid greedy task configuration
1 parent 7ced6dc commit 96108ee

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
@@ -40,7 +40,7 @@ checkstyle {
4040
toolVersion = libs.versions.checkstyle.get()
4141
}
4242

43-
tasks.withType<JavaCompile>().all { // Java compile-time options:
43+
tasks.withType<JavaCompile>().configureEach { // Java compile-time options:
4444
options.compilerArgs.add("-Xdiags:verbose")
4545

4646
// Suppress warnings that source value 8 is obsolete:
@@ -52,7 +52,7 @@ tasks.withType<JavaCompile>().all { // Java compile-time options:
5252
options.release = 8
5353
}
5454

55-
tasks.withType<JavaExec>().all { // Java runtime options:
55+
tasks.withType<JavaExec>().configureEach { // Java runtime options:
5656
if (isMacOS) {
5757
jvmArgs("-XstartOnFirstThread")
5858
}
@@ -66,7 +66,7 @@ tasks.withType<JavaExec>().all { // Java runtime options:
6666
//jvmArgs("-XX:+UseG1GC", "-XX:MaxGCPauseMillis=10")
6767
}
6868

69-
configurations.all {
69+
configurations.configureEach {
7070
resolutionStrategy.cacheChangingModulesFor(0, "seconds") // to disable caching of snapshots
7171
}
7272

0 commit comments

Comments
 (0)