Gradle: use System.getProperty( "org.gradle.parallel" ) instead of rootProject.property( "org.gradle.parallel" ) because this did not work with VM command-line option -Dorg.gradle.parallel=false

This commit is contained in:
Karl Tauber
2023-08-12 13:38:42 +02:00
parent a5b7e04943
commit 58dc14bb46

View File

@@ -126,7 +126,7 @@ tasks.withType<Sign>().configureEach {
// check whether parallel build is enabled
tasks.withType<PublishToMavenRepository>().configureEach {
doFirst {
if( rootProject.hasProperty( "org.gradle.parallel" ) && rootProject.property( "org.gradle.parallel" ) == "true" )
if( System.getProperty( "org.gradle.parallel" ) == "true" )
throw RuntimeException( "Publishing does not work correctly with enabled parallel build. Disable parallel build with VM option '-Dorg.gradle.parallel=false'." )
}
}