diff --git a/WesLibrary/build.gradle b/WesLibrary/build.gradle index 8ea3704..788eaa5 100644 --- a/WesLibrary/build.gradle +++ b/WesLibrary/build.gradle @@ -146,7 +146,7 @@ publishMavenPublicationToOSSRHRepository.dependsOn('assemble') signing { sign publishing.publications.maven } -tasks.withType(Sign) { +tasks.withType(Sign).configureEach { onlyIf { rootProject.hasProperty('signing.keyId') } } signMavenPublication.dependsOn('module') diff --git a/build.gradle b/build.gradle index b02a493..5bc1bc9 100644 --- a/build.gradle +++ b/build.gradle @@ -19,7 +19,7 @@ subprojects { apply from: rootProject.file('common.gradle') } -configurations.all { +configurations.configureEach { resolutionStrategy.cacheChangingModulesFor 0, 'seconds' // to disable caching of SNAPSHOTs } diff --git a/common.gradle b/common.gradle index 87c609f..fcc5470 100644 --- a/common.gradle +++ b/common.gradle @@ -12,7 +12,7 @@ checkstyle { toolVersion '9.3' } -tasks.withType(JavaCompile) { // Java compile-time options: +tasks.withType(JavaCompile).configureEach { // Java compile-time options: options.compilerArgs << '-Xdiags:verbose' if (JavaVersion.current().isCompatibleWith(JavaVersion.VERSION_14)) { // Suppress warnings that source value 7 is obsolete. @@ -29,7 +29,7 @@ tasks.withType(JavaCompile) { // Java compile-time options: import org.gradle.nativeplatform.platform.internal.DefaultNativePlatform Boolean isMacOS = DefaultNativePlatform.currentOperatingSystem.isMacOsX() -tasks.withType(JavaExec) { // Java runtime options: +tasks.withType(JavaExec).configureEach { // Java runtime options: if (isMacOS) { jvmArgs '-XstartOnFirstThread' }