Skip to content

Commit 8f17f23

Browse files
uschindlerChrisHegartydweissrmuir
committed
Bump minimum required Java version to 21 (#12753)
Co-authored-by: ChrisHegarty <chegar999@gmail.com> Co-authored-by: Dawid Weiss <dawid.weiss@carrotsearch.com> Co-authored-by: Robert Muir <rmuir@apache.org>
1 parent e7d2bd4 commit 8f17f23

15 files changed

Lines changed: 21 additions & 21 deletions

File tree

.github/actions/prepare-for-build/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ name: Prepare Lucene build
66
inputs:
77
java-version:
88
required: false
9-
default: 17
9+
default: 21
1010
description: "The default JDK version to set up."
1111

1212
java-distribution:

.github/workflows/distribution.yml

Whitespace-only changes.

.github/workflows/run-checks-all.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
strategy:
3030
matrix:
3131
os: [ ubuntu-latest ]
32-
java: [ '17' ]
32+
java: [ '21' ]
3333

3434
runs-on: ${{ matrix.os }}
3535

@@ -52,7 +52,7 @@ jobs:
5252
# windows-latest: fairly slow to build and results in odd errors (see LUCENE-10167)
5353
# macos-latest: a tad slower than ubuntu and pretty much the same (?) so leaving out.
5454
os: [ ubuntu-latest ]
55-
java: [ '17' ]
55+
java: [ '21' ]
5656

5757
runs-on: ${{ matrix.os }}
5858

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ comprehensive documentation, visit:
3939

4040
### Basic steps:
4141

42-
1. Install OpenJDK 17 or 18.
42+
1. Install OpenJDK 21.
4343
2. Clone Lucene's git repository (or download the source distribution).
4444
3. Run gradle launcher script (`gradlew`).
4545

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ ext {
7373
}
7474

7575
// Minimum Java version required to compile and run Lucene.
76-
minJavaVersion = JavaVersion.VERSION_17
76+
minJavaVersion = JavaVersion.VERSION_21
7777

7878
// snapshot build marker used in scripts.
7979
snapshotBuild = version.contains("SNAPSHOT")

buildSrc/build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ repositories {
2121

2222
ext {
2323
// Minimum Java version required to compile buildSrc.
24-
minJavaVersion = JavaVersion.VERSION_17
24+
minJavaVersion = JavaVersion.VERSION_21
2525
}
2626

2727

buildSrc/src/main/java/org/apache/lucene/gradle/WrapperDownloader.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,8 @@ public static void main(String[] args) {
5555

5656
public static void checkVersion() {
5757
int major = Runtime.version().feature();
58-
if (major < 17 || major > 21) {
59-
throw new IllegalStateException("java version must be between 17 and 21, your version: " + major);
58+
if (major != 21) {
59+
throw new IllegalStateException("java version must be 21, your version: " + major);
6060
}
6161
}
6262

dev-tools/scripts/releaseWizard.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666
from scriptutil import BranchType, Version, download, run
6767

6868
# Lucene-to-Java version mapping
69-
java_versions = {6: 8, 7: 8, 8: 8, 9: 11, 10: 17}
69+
java_versions = {6: 8, 7: 8, 8: 8, 9: 11, 10: 21}
7070
editor = None
7171

7272
# Edit this to add other global jinja2 variables or filters

dev-tools/scripts/smokeTestRelease.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
from collections import namedtuple
4040
import scriptutil
4141

42-
BASE_JAVA_VERSION = "17"
42+
BASE_JAVA_VERSION = "21"
4343

4444
# This tool expects to find /lucene off the base URL. You
4545
# must have a working gpg, tar, unzip in your path. This has been

gradle/template.gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,5 +102,5 @@ tests.jvms=@TEST_JVMS@
102102
org.gradle.java.installations.auto-download=true
103103

104104
# Set these to enable automatic JVM location discovery.
105-
org.gradle.java.installations.fromEnv=JAVA17_HOME,JAVA19_HOME,JAVA20_HOME,JAVA21_HOME,JAVA22_HOME,RUNTIME_JAVA_HOME
105+
org.gradle.java.installations.fromEnv=JAVA21_HOME,JAVA22_HOME,RUNTIME_JAVA_HOME
106106
#org.gradle.java.installations.paths=(custom paths)

0 commit comments

Comments
 (0)