From f37f0bf3a761e72c77feabcc530fe84a69033bbd Mon Sep 17 00:00:00 2001 From: Uwe Schindler Date: Sun, 23 Aug 2020 17:51:11 +0200 Subject: [PATCH] Gradle hotfix in preparation for Jenkins: Fix for whitespace in directory violations --- gradlew | 8 ++++---- gradlew.bat | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/gradlew b/gradlew index b275a1259b3..0ccd1fb609c 100755 --- a/gradlew +++ b/gradlew @@ -103,8 +103,8 @@ location of your Java installation." fi # LUCENE-9471: workaround for gradle leaving junk temp. files behind. -GRADLE_TEMPDIR=$APP_HOME/.gradle/tmp -mkdir -p $GRADLE_TEMPDIR +GRADLE_TEMPDIR="$APP_HOME/.gradle/tmp" +mkdir -p "$GRADLE_TEMPDIR" if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then GRADLE_TEMPDIR=`cygpath --path --mixed "$GRADLE_TEMPDIR"` fi @@ -114,8 +114,8 @@ DEFAULT_JVM_OPTS="$DEFAULT_JVM_OPTS \"-Djava.io.tmpdir=$GRADLE_TEMPDIR\"" if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then APP_HOME=`cygpath --path --mixed "$APP_HOME"` fi -GRADLE_WRAPPER_JAR=$APP_HOME/gradle/wrapper/gradle-wrapper.jar -if ! $JAVACMD --source 11 $APP_HOME/buildSrc/src/main/java/org/apache/lucene/gradle/WrapperDownloader.java $GRADLE_WRAPPER_JAR ; then +GRADLE_WRAPPER_JAR="$APP_HOME/gradle/wrapper/gradle-wrapper.jar" +if ! "$JAVACMD" --source 11 "$APP_HOME/buildSrc/src/main/java/org/apache/lucene/gradle/WrapperDownloader.java" "$GRADLE_WRAPPER_JAR" ; then echo "\nSomething went wrong. Make sure you're using Java 11 or later." exit $? fi diff --git a/gradlew.bat b/gradlew.bat index 6f950711b44..7ff625a13fb 100644 --- a/gradlew.bat +++ b/gradlew.bat @@ -34,8 +34,8 @@ set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m" @rem LUCENE-9471: workaround for gradle leaving junk temp. files behind. SET GRADLE_TEMPDIR=%DIRNAME%\.gradle\tmp -IF NOT EXIST "%GRADLE_TEMPDIR%" MKDIR %GRADLE_TEMPDIR% -SET DEFAULT_JVM_OPTS=%DEFAULT_JVM_OPTS% -Djava.io.tmpdir=%GRADLE_TEMPDIR% +IF NOT EXIST "%GRADLE_TEMPDIR%" MKDIR "%GRADLE_TEMPDIR%" +SET DEFAULT_JVM_OPTS=%DEFAULT_JVM_OPTS% "-Djava.io.tmpdir=%GRADLE_TEMPDIR%" @rem Find java.exe if defined JAVA_HOME goto findJavaFromJavaHome @@ -93,7 +93,7 @@ set CLASSPATH=%GRADLE_WRAPPER_JAR% @rem Don't fork a daemon mode on initial run that generates local defaults. SET GRADLE_DAEMON_CTRL= -IF NOT EXIST %DIRNAME%\gradle.properties SET GRADLE_DAEMON_CTRL=--no-daemon +IF NOT EXIST "%DIRNAME%\gradle.properties" SET GRADLE_DAEMON_CTRL=--no-daemon @rem Execute Gradle "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %GRADLE_DAEMON_CTRL% %CMD_LINE_ARGS%