Skip to content

Commit

Permalink
tentative: minimum Java17 for this PR
Browse files Browse the repository at this point in the history
  • Loading branch information
cpoerschke committed Feb 13, 2024
1 parent bdee568 commit 541dceb
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ public static void main(String[] args) {

public static void checkVersion() {
int major = Runtime.getRuntime().version().feature();
if (major < 11 || major > 21) {
throw new IllegalStateException("java version must be between 11 and 21, your version: " + major);
if (major < 17 || major > 21) {
throw new IllegalStateException("java version must be between 17 and 21, your version: " + major);
}
}

Expand Down
2 changes: 1 addition & 1 deletion gradlew
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ GRADLE_WRAPPER_JAR="$APP_HOME/gradle/wrapper/gradle-wrapper.jar"
"$JAVACMD" $JAVA_OPTS --source 11 "$APP_HOME/buildSrc/src/main/java/org/apache/lucene/gradle/WrapperDownloader.java" "$GRADLE_WRAPPER_JAR"
WRAPPER_STATUS=$?
if [ "$WRAPPER_STATUS" -eq 1 ]; then
echo "ERROR: Something went wrong. Make sure you're using Java version between 11 and 21."
echo "ERROR: Something went wrong. Make sure you're using Java version between 17 and 21."
exit $WRAPPER_STATUS
elif [ "$WRAPPER_STATUS" -ne 0 ]; then
exit $WRAPPER_STATUS
Expand Down
2 changes: 1 addition & 1 deletion gradlew.bat
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ goto fail

:failWithJvmMessage
@rem https://github.com/apache/lucene/pull/819
echo Error: Something went wrong. Make sure you're using Java version between 11 and 21.
echo Error: Something went wrong. Make sure you're using Java version between 17 and 21.

:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
Expand Down

0 comments on commit 541dceb

Please sign in to comment.