Skip to content

Commit f39706d

Browse files
committed
buildscripts: avoid greedy task configuration
1 parent b6d97d8 commit f39706d

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

library/build.gradle.kts

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

37-
tasks.withType<JavaCompile>().all { // Java compile-time options:
37+
tasks.withType<JavaCompile>().configureEach { // Java compile-time options:
3838
options.compilerArgs.add("-Xdiags:verbose")
3939
if (javaVersion.isCompatibleWith(JavaVersion.VERSION_14)) {
4040
// Suppress warnings that source value 7 is obsolete.
@@ -48,7 +48,7 @@ tasks.withType<JavaCompile>().all { // Java compile-time options:
4848
}
4949
}
5050

51-
tasks.withType<Javadoc>().all {
51+
tasks.withType<Javadoc>().configureEach {
5252
// Disable doclint for JDK8+.
5353
if (javaVersion.isJava8Compatible()) {
5454
(options as CoreJavadocOptions).apply {
@@ -182,7 +182,7 @@ tasks.named("publishMavenPublicationToCentralRepository") { dependsOn("assemble"
182182
signing {
183183
sign(publishing.publications["maven"])
184184
}
185-
tasks.withType<Sign>().all {
185+
tasks.withType<Sign>().configureEach {
186186
onlyIf { project.hasProperty("signing.keyId") }
187187
}
188188
tasks.named("signMavenPublication") { dependsOn("module") }

vorbis/build.gradle.kts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ checkstyle {
2424
toolVersion = libs.versions.checkstyle.get()
2525
}
2626

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

3030
// Suppress warnings that source value 7 is obsolete:
@@ -36,7 +36,7 @@ tasks.withType<JavaCompile>().all { // Java compile-time options:
3636
options.release = 8
3737
}
3838

39-
tasks.withType<Javadoc>().all {
39+
tasks.withType<Javadoc>().configureEach {
4040
// Disable doclint:
4141
(options as CoreJavadocOptions).apply {
4242
addStringOption("Xdoclint:none", "-quiet")
@@ -168,7 +168,7 @@ tasks.named("publishMavenPublicationToCentralRepository") { dependsOn("assemble"
168168
signing {
169169
sign(publishing.publications["maven"])
170170
}
171-
tasks.withType<Sign>().all {
171+
tasks.withType<Sign>().configureEach {
172172
onlyIf { project.hasProperty("signing.keyId") }
173173
}
174174
tasks.named("signMavenPublication") { dependsOn("module") }

0 commit comments

Comments
 (0)