Skip to content

Commit 2385c8d

Browse files
committed
build.gradle.kts: avoid greedy task configuration
1 parent 6478898 commit 2385c8d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

build.gradle.kts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ java {
1919
targetCompatibility = JavaVersion.VERSION_1_7
2020
}
2121

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

2525
// Suppress warnings that source value 7 is obsolete.
@@ -32,7 +32,7 @@ tasks.withType<JavaCompile>().all { // Java compile-time options:
3232
options.release = 7
3333
}
3434

35-
tasks.withType<Javadoc>().all {
35+
tasks.withType<Javadoc>().configureEach {
3636
(options as CoreJavadocOptions).apply {
3737
addStringOption("Xdoclint:none", "-quiet")
3838
}
@@ -180,7 +180,7 @@ tasks.named("publishMavenPublicationToCentralRepository") { dependsOn("assemble"
180180
signing {
181181
sign(publishing.publications["maven"])
182182
}
183-
tasks.withType<Sign>().all {
183+
tasks.withType<Sign>().configureEach {
184184
onlyIf { project.hasProperty("signing.keyId") }
185185
}
186186
tasks.named("signMavenPublication") { dependsOn("module") }

0 commit comments

Comments
 (0)