Skip to content

Commit c43daa0

Browse files
committed
Require JDK 25 for building (but keep the Java 17 baseline)
1 parent d6eedd5 commit c43daa0

File tree

13 files changed

+30
-29
lines changed

13 files changed

+30
-29
lines changed

.github/workflows/ci-report.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # v4.7.1
2626
with:
2727
distribution: 'temurin'
28-
java-version: '21'
28+
java-version: '25'
2929

3030
- name: Generate cache key
3131
id: cache-key

.github/workflows/ci.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
build:
3434
permissions:
3535
contents: read
36-
name: OpenJDK 21 - ${{matrix.rdbms}}
36+
name: OpenJDK 25 - ${{matrix.rdbms}}
3737
runs-on: ubuntu-latest
3838
strategy:
3939
fail-fast: false
@@ -63,11 +63,11 @@ jobs:
6363
env:
6464
RDBMS: ${{ matrix.rdbms }}
6565
run: ci/database-start.sh
66-
- name: Set up Java 21
66+
- name: Set up Java 25
6767
uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # v4.7.1
6868
with:
6969
distribution: 'temurin'
70-
java-version: '21'
70+
java-version: '25'
7171

7272
- name: Generate cache key
7373
id: cache-key
@@ -147,7 +147,7 @@ jobs:
147147
otp:
148148
permissions:
149149
contents: read
150-
name: GraalVM 21 - ${{matrix.rdbms}}
150+
name: GraalVM 25 - ${{matrix.rdbms}}
151151
runs-on: [ self-hosted, Linux, X64, OracleTestPilot ]
152152
strategy:
153153
fail-fast: false
@@ -161,11 +161,11 @@ jobs:
161161
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
162162
with:
163163
persist-credentials: false
164-
- name: Set up Java 21
164+
- name: Set up Java 25
165165
uses: graalvm/setup-graalvm@aafbedb8d382ed0ca6167d3a051415f20c859274 # v1.2.8
166166
with:
167167
distribution: 'graalvm'
168-
java-version: '21'
168+
java-version: '25'
169169
- name: Generate cache key
170170
id: cache-key
171171
run: |
@@ -270,11 +270,11 @@ jobs:
270270
persist-credentials: false
271271
- name: Reclaim disk space and sanitize user home
272272
run: .github/ci-prerequisites-atlas.sh
273-
- name: Set up Java 21
273+
- name: Set up Java 25
274274
uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # v4.7.1
275275
with:
276276
distribution: 'temurin'
277-
java-version: '21'
277+
java-version: '25'
278278

279279
- name: Generate cache key
280280
id: cache-key

.github/workflows/codeql.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ jobs:
4040
uses: actions/setup-java@c5195efecf7bdfc987ee8bae7a71cb8b11521c00 # v4.7.1
4141
with:
4242
distribution: 'temurin'
43-
java-version: '21'
43+
java-version: '25'
4444

4545
- name: Checkout repository
4646
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

Jenkinsfile

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import org.jenkinsci.plugins.workflow.support.steps.build.RunWrapper
1414
@Library('hibernate-jenkins-pipeline-helpers') _
1515
import org.hibernate.jenkins.pipeline.helpers.job.JobHelper
1616

17-
@Field final String DEFAULT_JDK_VERSION = '21'
17+
@Field final String DEFAULT_JDK_VERSION = '25'
1818
@Field final String DEFAULT_JDK_TOOL = "OpenJDK ${DEFAULT_JDK_VERSION} Latest"
1919
@Field final String NODE_PATTERN_BASE = 'Worker&&Containers'
2020
@Field List<BuildEnvironment> environments
@@ -40,14 +40,15 @@ stage('Configure') {
4040
// Don't build with HANA by default, but only do it nightly until we receive a 3rd instance
4141
// new BuildEnvironment( dbName: 'hana_cloud', dbLockableResource: 'hana-cloud', dbLockResourceAsHost: true ),
4242
new BuildEnvironment( node: 's390x' ),
43-
// We generally build with JDK 21, but our baseline is Java 17, so we test with JDK 17, to be sure everything works.
43+
// We generally build with JDK 25, but our baseline is Java 17, so we test with JDK 17, to be sure everything works.
4444
// Here we even compile the main code with JDK 17, to be sure no JDK 18+ classes are depended on.
45-
new BuildEnvironment( mainJdkVersion: '17', testJdkVersion: '17' ),
45+
new BuildEnvironment( mainJdkVersion: '17', testJdkVersion: '17' ),
46+
new BuildEnvironment( mainJdkVersion: '21', testJdkVersion: '21' ),
47+
new BuildEnvironment( mainJdkVersion: '25', testJdkVersion: '25' ),
4648
// We want to enable preview features when testing newer builds of OpenJDK:
4749
// even if we don't use these features, just enabling them can cause side effects
4850
// and it's useful to test that.
49-
new BuildEnvironment( testJdkVersion: '24', testJdkLauncherArgs: '--enable-preview', additionalOptions: '-PskipJacoco=true' ),
50-
new BuildEnvironment( testJdkVersion: '25', testJdkLauncherArgs: '--enable-preview', additionalOptions: '-PskipJacoco=true' ),
51+
5152
// The following JDKs aren't supported by Hibernate ORM out-of-the box yet:
5253
// they require the use of -Dnet.bytebuddy.experimental=true.
5354
// Make sure to remove that argument as soon as possible

README.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ See link:MAINTAINERS.md#ci[MAINTAINERS.md] for information about CI.
1818

1919
== Building from sources
2020

21-
The build requires at least JDK 21, and produces Java 17 bytecode.
21+
The build requires at least JDK 25, and produces Java 17 bytecode.
2222

2323
Hibernate uses https://gradle.org[Gradle] as its build tool. See the _Gradle Primer_ section below if you are new to
2424
Gradle.

ci/jpa-3.2-tck.Jenkinsfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,15 @@ else {
2222
pipeline {
2323
agent none
2424
tools {
25-
jdk 'OpenJDK 21 Latest'
25+
jdk 'OpenJDK 25 Latest'
2626
}
2727
options {
2828
rateLimitBuilds(throttle: [count: throttleCount, durationName: 'day', userBoost: true])
2929
buildDiscarder(logRotator(numToKeepStr: '3', artifactNumToKeepStr: '3'))
3030
disableConcurrentBuilds(abortPrevious: true)
3131
}
3232
parameters {
33-
choice(name: 'IMAGE_JDK', choices: ['jdk17', 'jdk21'], description: 'The JDK base image version to use for the TCK image.')
33+
choice(name: 'IMAGE_JDK', choices: ['jdk17', 'jdk21', 'jdk25'], description: 'The JDK base image version to use for the TCK image.')
3434
string(name: 'TCK_VERSION', defaultValue: '3.2.0', description: 'The version of the Jakarta JPA TCK i.e. `2.2.0` or `3.0.1`')
3535
string(name: 'TCK_SHA', defaultValue: '', description: 'The SHA256 of the Jakarta JPA TCK that is distributed under https://download.eclipse.org/jakartaee/persistence/3.1/jakarta-persistence-tck-${TCK_VERSION}.zip.sha256')
3636
string(name: 'TCK_URL', defaultValue: 'https://www.eclipse.org/downloads/download.php?file=/ee4j/jakartaee-tck/jakartaee11/staged/eftl/jakarta-persistence-tck-3.2.0.zip&mirror_id=1', description: 'The URL from which to download the TCK ZIP file. Only needed for testing staged builds. Ensure the TCK_VERSION variable matches the ZIP file name suffix.')

ci/release/Jenkinsfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ pipeline {
7070
cron('0 0 * * 0')
7171
}
7272
tools {
73-
jdk 'OpenJDK 21 Latest'
73+
jdk 'OpenJDK 25 Latest'
7474
}
7575
options {
7676
buildDiscarder logRotator(daysToKeepStr: '30', numToKeepStr: '10')

ci/snapshot-publish.Jenkinsfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ pipeline {
2323
label 'Release'
2424
}
2525
tools {
26-
jdk 'OpenJDK 21 Latest'
26+
jdk 'OpenJDK 25 Latest'
2727
}
2828
options {
2929
rateLimitBuilds(throttle: [count: 1, durationName: 'hour', userBoost: true])

documentation/documentation.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -216,8 +216,8 @@ def aggregateJavadocsTask = tasks.register( "javadoc", Javadoc ) {
216216
? javadocTool.get().metadata.languageVersion
217217
: JavaLanguageVersion.of( JavaVersion.current().name )
218218

219-
if ( javaLanguageVersion.asInt() != 21 ) {
220-
println "Aggregated Javadocs are bing built` using a JDK different than version 21: \n" +
219+
if ( javaLanguageVersion.asInt() != jdkVersions.min.asInt() ) {
220+
println "Aggregated Javadocs are bing built` using a JDK different than version ${jdkVersions.min.asInt()}: \n" +
221221
"\t* `stylesheet.css` might not be compatible\n" +
222222
"\t* generating the User Guide settings fragment might not succeed"
223223
}

gradle.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ org.gradle.java.installations.auto-download=false
2727

2828
# externalized definition of JDK versions so that they are available in both Project (build.gradle) and Settings (settings.gradle)
2929
orm.jdk.base=17
30-
orm.jdk.min=23
30+
orm.jdk.min=25
3131
# See gradlew/wrapper/gradle-wrapper.properties, https://docs.gradle.org/current/userguide/compatibility.html#java_runtime
32-
orm.jdk.max=24
32+
orm.jdk.max=25
3333

3434
# The minimum version of Gradle supported for the ORM Gradle plugin.
3535
# This is the version used in the plugin tests, used to make sure we do not break compatibility.

0 commit comments

Comments
 (0)