From 1a1e180f9371769da3123180e61b5d7cf0a12226 Mon Sep 17 00:00:00 2001 From: Gerd Aschemann Date: Sun, 18 Aug 2024 18:28:56 +0200 Subject: [PATCH] Call Gradle on windows with cmd processor --- integration-test/build.gradle | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/integration-test/build.gradle b/integration-test/build.gradle index 70c18912..f5b75b9b 100644 --- a/integration-test/build.gradle +++ b/integration-test/build.gradle @@ -27,9 +27,11 @@ tasks.register("integrationTestPrepare") { doLast { def result = exec { workingDir INTEGRATION_TEST_DIRECTORY_COMMON - commandLine ((System.getProperty("os.name") ==~ /Windows.*/ - ? "..\\..\\gradlew.bat" - : "../../gradlew"), "clean", "buildReadmeAll") + if (System.getProperty("os.name") ==~ /Windows.*/) { + commandLine('cmd', '/c', '..\\..\\gradlew.bat', "clean", "buildReadmeAll") + } else { + commandLine("../../gradlew", "clean", "buildReadmeAll") + } } logger.debug "Script output: $result" } @@ -65,9 +67,11 @@ tasks.register("integrationTestGradlePlugin") { doLast { def result = exec { workingDir INTEGRATION_TEST_DIRECTORY_GRADLE_PLUGIN - commandLine ((System.getProperty("os.name") ==~ /Windows.*/ - ? "..\\..\\gradlew.bat" - : "../../gradlew"), "clean", "htmlSanityCheck", "-PhtmlSanityCheckVersion=${project.version}") + if (System.getProperty("os.name") ==~ /Windows.*/) { + commandLine('cmd', '/c', '..\\..\\gradlew.bat', "clean", "htmlSanityCheck", "-PhtmlSanityCheckVersion=${project.version}") + } else { + commandLine("../../gradlew", "clean", "htmlSanityCheck", "-PhtmlSanityCheckVersion=${project.version}") + } } logger.debug "Script output: $result" assert testIndex.exists()