dweiss commented on code in PR #16483:
URL: https://github.com/apache/lucene/pull/16483#discussion_r3726644871


##########
gradlew.bat:
##########
@@ -105,21 +86,34 @@ IF NOT EXIST "%APP_HOME%\gradle.properties" (
   endlocal
 )
 
-goto launchGradle
-
-:failWithJvmMessage
-@rem https://github.com/apache/lucene/pull/819
-echo Error: Something went wrong. Make sure you're using the minimum required 
Java version to compile Lucene.
-goto exitWithErrorLevel
-
-:launchGradle
+@rem A manually-installed gradle-wrapper.jar takes priority over our 
source-based bootstrap.
+SET GRADLE_WRAPPER_JAR=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
+SET GRADLE_WRAPPER_SRC=%APP_HOME%\gradle\wrapper\GradleWrapper.java
+SET GRADLE_WRAPPER_CACHE=%APP_HOME%\.gradle\tmp\gradle-wrapper-classes
+SET "JAVAC_EXE=%JAVA_EXE:java.exe=javac.exe%"
+
+@rem Compile GradleWrapper.java once and reuse the compiled classes, instead 
of paying the
+@rem single-file-source-launch recompile cost on every invocation. Falls back 
to source-launch
+@rem (slower, but self-healing) if compilation isn't available or fails for 
any reason.
+@rem No staleness check: if you edit GradleWrapper.java, delete 
%GRADLE_WRAPPER_CACHE% to force
+@rem a recompile (this file changes rarely, so keeping this simple is worth 
that manual step).

Review Comment:
   It's going to be trouble on Windows if the wrapper is updated. 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to