From 58dc14bb46542fdf04585eb5220cccaab310c5cd Mon Sep 17 00:00:00 2001 From: Karl Tauber Date: Sat, 12 Aug 2023 13:38:42 +0200 Subject: [PATCH] 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` --- buildSrc/src/main/kotlin/flatlaf-publish.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/buildSrc/src/main/kotlin/flatlaf-publish.gradle.kts b/buildSrc/src/main/kotlin/flatlaf-publish.gradle.kts index 3dddae71..7e405434 100644 --- a/buildSrc/src/main/kotlin/flatlaf-publish.gradle.kts +++ b/buildSrc/src/main/kotlin/flatlaf-publish.gradle.kts @@ -126,7 +126,7 @@ tasks.withType().configureEach { // check whether parallel build is enabled tasks.withType().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'." ) } }