Skip to content

Commit 5d21f6c

Browse files
committed
Raise the Java baseline from 11 to 21
Compiles and publishes at Java 21 instead of Java 11, and moves both CI workflows to a JDK 21 runner. This is a breaking change for consumers: the emitted bytecode goes from class file version 55 to 65, so anything still building or running on Java 11 or 17 can no longer use these artifacts. Verified: clean build emits major version 65 for both modules with 300 tests passing, and CFLint - the main downstream consumer - compiles and passes its 675 tests against the result. CFLint does need a matching change. Its CI pins JDK 11 in gradle.yml and publish.yml, and loading class file version 65 on an 11 JVM fails with UnsupportedClassVersionError, so those must move to 21 before it can build against this. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GzpZFd4rnE1Yi2sVHAji35
1 parent 24df7d0 commit 5d21f6c

4 files changed

Lines changed: 7 additions & 7 deletions

File tree

.github/workflows/gradle.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@ jobs:
1717
- name: Checkout
1818
uses: actions/checkout@v4
1919

20-
- name: Set up JDK 11
20+
- name: Set up JDK 21
2121
uses: actions/setup-java@v4
2222
with:
2323
distribution: temurin
24-
java-version: 11
24+
java-version: 21
2525

2626
- name: Setup Gradle
2727
uses: gradle/actions/setup-gradle@v3

.github/workflows/maven-publish.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@ jobs:
2323

2424
steps:
2525
- uses: actions/checkout@v4
26-
- name: Set up JDK 11
26+
- name: Set up JDK 21
2727
uses: actions/setup-java@v4
2828
with:
29-
java-version: '11'
29+
java-version: '21'
3030
distribution: 'temurin'
3131
server-id: github # Value of the distributionManagement/repository/id field of the pom.xml
3232
settings-path: ${{ github.workspace }} # location for the settings.xml file

build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,8 +132,8 @@ subprojects {
132132
copyTo 'META-INF/MANIFEST.MF'
133133
}
134134

135-
sourceCompatibility = 11
136-
targetCompatibility = 11
135+
sourceCompatibility = 21
136+
targetCompatibility = 21
137137
tasks.withType(JavaCompile) { options.encoding = 'UTF-8' }
138138

139139
task sourcesJar(type: Jar) {

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
<properties>
5858
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
5959

60-
<maven.compiler.release>11</maven.compiler.release>
60+
<maven.compiler.release>21</maven.compiler.release>
6161

6262
<jacoco.version>0.8.12</jacoco.version>
6363
<!-- jacoco:prepare-agent overwrites this at build time with the -javaagent setting.

0 commit comments

Comments
 (0)