Skip to content

Commit

Permalink
Call Gradle on windows with cmd processor
Browse files Browse the repository at this point in the history
  • Loading branch information
ascheman committed Aug 18, 2024
1 parent 9c45e30 commit 1a1e180
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions integration-test/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
Expand Down Expand Up @@ -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()
Expand Down

0 comments on commit 1a1e180

Please sign in to comment.