Merge branch 'java_21' of https://github.com/ChrisHegarty/lucene into main

This commit is contained in:
Uwe Schindler 2024-02-28 23:59:01 +01:00
commit a356fc1e23
15 changed files with 21 additions and 21 deletions

View File

@ -6,7 +6,7 @@ name: Prepare Lucene build
inputs: inputs:
java-version: java-version:
required: false required: false
default: 17 default: 21
description: "The default JDK version to set up." description: "The default JDK version to set up."
java-distribution: java-distribution:

0
.github/workflows/distribution.yml vendored Normal file
View File

View File

@ -29,7 +29,7 @@ jobs:
strategy: strategy:
matrix: matrix:
os: [ ubuntu-latest ] os: [ ubuntu-latest ]
java: [ '17' ] java: [ '21' ]
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}
@ -52,7 +52,7 @@ jobs:
# windows-latest: fairly slow to build and results in odd errors (see LUCENE-10167) # windows-latest: fairly slow to build and results in odd errors (see LUCENE-10167)
# macos-latest: a tad slower than ubuntu and pretty much the same (?) so leaving out. # macos-latest: a tad slower than ubuntu and pretty much the same (?) so leaving out.
os: [ ubuntu-latest ] os: [ ubuntu-latest ]
java: [ '17' ] java: [ '21' ]
runs-on: ${{ matrix.os }} runs-on: ${{ matrix.os }}

View File

@ -39,7 +39,7 @@ comprehensive documentation, visit:
### Basic steps: ### Basic steps:
1. Install OpenJDK 17 or 18. 1. Install OpenJDK 21.
2. Clone Lucene's git repository (or download the source distribution). 2. Clone Lucene's git repository (or download the source distribution).
3. Run gradle launcher script (`gradlew`). 3. Run gradle launcher script (`gradlew`).

View File

@ -73,7 +73,7 @@ ext {
} }
// Minimum Java version required to compile and run Lucene. // Minimum Java version required to compile and run Lucene.
minJavaVersion = JavaVersion.VERSION_17 minJavaVersion = JavaVersion.VERSION_21
// snapshot build marker used in scripts. // snapshot build marker used in scripts.
snapshotBuild = version.contains("SNAPSHOT") snapshotBuild = version.contains("SNAPSHOT")

View File

@ -21,7 +21,7 @@ repositories {
ext { ext {
// Minimum Java version required to compile buildSrc. // Minimum Java version required to compile buildSrc.
minJavaVersion = JavaVersion.VERSION_17 minJavaVersion = JavaVersion.VERSION_21
} }

View File

@ -55,8 +55,8 @@ public class WrapperDownloader {
public static void checkVersion() { public static void checkVersion() {
int major = Runtime.version().feature(); int major = Runtime.version().feature();
if (major < 17 || major > 21) { if (major != 21) {
throw new IllegalStateException("java version must be between 17 and 21, your version: " + major); throw new IllegalStateException("java version must be 21, your version: " + major);
} }
} }

View File

@ -66,7 +66,7 @@ from consolemenu.items import FunctionItem, SubmenuItem, ExitItem
from scriptutil import BranchType, Version, download, run from scriptutil import BranchType, Version, download, run
# Lucene-to-Java version mapping # Lucene-to-Java version mapping
java_versions = {6: 8, 7: 8, 8: 8, 9: 11, 10: 17} java_versions = {6: 8, 7: 8, 8: 8, 9: 11, 10: 21}
editor = None editor = None
# Edit this to add other global jinja2 variables or filters # Edit this to add other global jinja2 variables or filters

View File

@ -39,7 +39,7 @@ import zipfile
from collections import namedtuple from collections import namedtuple
import scriptutil import scriptutil
BASE_JAVA_VERSION = "17" BASE_JAVA_VERSION = "21"
# This tool expects to find /lucene off the base URL. You # This tool expects to find /lucene off the base URL. You
# must have a working gpg, tar, unzip in your path. This has been # must have a working gpg, tar, unzip in your path. This has been

View File

@ -102,5 +102,5 @@ tests.jvms=@TEST_JVMS@
org.gradle.java.installations.auto-download=true org.gradle.java.installations.auto-download=true
# Set these to enable automatic JVM location discovery. # Set these to enable automatic JVM location discovery.
org.gradle.java.installations.fromEnv=JAVA17_HOME,JAVA19_HOME,JAVA20_HOME,JAVA21_HOME,JAVA22_HOME,RUNTIME_JAVA_HOME org.gradle.java.installations.fromEnv=JAVA21_HOME,JAVA22_HOME,RUNTIME_JAVA_HOME
#org.gradle.java.installations.paths=(custom paths) #org.gradle.java.installations.paths=(custom paths)

View File

@ -10,9 +10,9 @@ org.eclipse.jdt.core.compiler.annotation.nullable.secondary=
org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
org.eclipse.jdt.core.compiler.codegen.targetPlatform=17 org.eclipse.jdt.core.compiler.codegen.targetPlatform=21
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.compliance=17 org.eclipse.jdt.core.compiler.compliance=21
org.eclipse.jdt.core.compiler.debug.lineNumber=generate org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate org.eclipse.jdt.core.compiler.debug.sourceFile=generate
@ -143,7 +143,7 @@ org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=error
org.eclipse.jdt.core.compiler.problem.unusedWarningToken=ignore org.eclipse.jdt.core.compiler.problem.unusedWarningToken=ignore
org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=error org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=error
org.eclipse.jdt.core.compiler.release=disabled org.eclipse.jdt.core.compiler.release=disabled
org.eclipse.jdt.core.compiler.source=17 org.eclipse.jdt.core.compiler.source=21
org.eclipse.jdt.core.compiler.taskCaseSensitive=enabled org.eclipse.jdt.core.compiler.taskCaseSensitive=enabled
org.eclipse.jdt.core.compiler.taskPriorities=HIGH org.eclipse.jdt.core.compiler.taskPriorities=HIGH
org.eclipse.jdt.core.compiler.taskTags=nocommit org.eclipse.jdt.core.compiler.taskTags=nocommit

2
gradlew vendored
View File

@ -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" "$JAVACMD" $JAVA_OPTS --source 11 "$APP_HOME/buildSrc/src/main/java/org/apache/lucene/gradle/WrapperDownloader.java" "$GRADLE_WRAPPER_JAR"
WRAPPER_STATUS=$? WRAPPER_STATUS=$?
if [ "$WRAPPER_STATUS" -eq 1 ]; then if [ "$WRAPPER_STATUS" -eq 1 ]; then
echo "ERROR: Something went wrong. Make sure you're using Java version between 17 and 21." echo "ERROR: Something went wrong. Make sure you're using Java version of exactly 21."
exit $WRAPPER_STATUS exit $WRAPPER_STATUS
elif [ "$WRAPPER_STATUS" -ne 0 ]; then elif [ "$WRAPPER_STATUS" -ne 0 ]; then
exit $WRAPPER_STATUS exit $WRAPPER_STATUS

2
gradlew.bat vendored
View File

@ -106,7 +106,7 @@ goto fail
:failWithJvmMessage :failWithJvmMessage
@rem https://github.com/apache/lucene/pull/819 @rem https://github.com/apache/lucene/pull/819
echo Error: Something went wrong. Make sure you're using Java version between 17 and 21. echo Error: Something went wrong. Make sure you're using Java version of exactly 21.
:fail :fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of

View File

@ -153,9 +153,6 @@ Other
* LUCENE-10376: Roll up the loop in VInt/VLong in DataInput. (Guo Feng) * LUCENE-10376: Roll up the loop in VInt/VLong in DataInput. (Guo Feng)
* LUCENE-10283: The minimum required Java version was bumped from 11 to 17.
(Adrien Grand, Uwe Schindler, Dawid Weiss, Robert Muir)
* LUCENE-10253: The @BadApple annotation has been removed from the test * LUCENE-10253: The @BadApple annotation has been removed from the test
framework. (Adrien Grand) framework. (Adrien Grand)
@ -178,6 +175,9 @@ Other
* GITHUB#13001: Put Thread#sleep() on the list of forbidden APIs. (Shubham Chaudhary) * GITHUB#13001: Put Thread#sleep() on the list of forbidden APIs. (Shubham Chaudhary)
* GITHUB#12753: Bump minimum required Java version to 21
(Chris Hegarty, Robert Muir, Uwe Schindler)
======================== Lucene 9.11.0 ======================= ======================== Lucene 9.11.0 =======================
API Changes API Changes

View File

@ -17,7 +17,7 @@
# System Requirements # System Requirements
Apache Lucene runs on Java 17 or greater. Apache Lucene runs on Java 21 or greater.
It is also recommended to always use the latest update version of your It is also recommended to always use the latest update version of your
Java VM, because bugs may affect Lucene. An overview of known JVM bugs Java VM, because bugs may affect Lucene. An overview of known JVM bugs