Skip to content

Commit f4221db

Browse files
committed
Update to support JDK 21+ with matrix builds
- Changed GitHub Actions to use matrix strategy for JDK 21, 22, 23, 24 - Updated Maven configuration to target JDK 21 as minimum - Updated README to reflect JDK 21+ support - Enables broader compatibility while testing on all recent JDK versions
1 parent aa87d1d commit f4221db

File tree

3 files changed

+14
-10
lines changed

3 files changed

+14
-10
lines changed

.github/workflows/maven.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,18 @@ on:
99
jobs:
1010
build:
1111
runs-on: ubuntu-latest
12+
strategy:
13+
matrix:
14+
java: [ '21', '22', '23', '24' ]
15+
name: Build with JDK ${{ matrix.java }}
1216

1317
steps:
1418
- uses: actions/checkout@v4
1519

16-
- name: Set up JDK 24
20+
- name: Set up JDK ${{ matrix.java }}
1721
uses: actions/setup-java@v4
1822
with:
19-
java-version: '24'
23+
java-version: ${{ matrix.java }}
2024
distribution: 'oracle'
2125

2226
- name: Cache Maven dependencies

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# JSON Experimental - JDK 24 Backport
1+
# JSON Experimental - JDK 21+ Backport
22

3-
This repository contains a backport of the experimental JSON API from the [jdk-sandbox project](https://github.com/openjdk/jdk-sandbox) to JDK 24.
3+
This repository contains a backport of the experimental JSON API from the [jdk-sandbox project](https://github.com/openjdk/jdk-sandbox) to JDK 21 and later.
44

55
## Origin
66

@@ -14,11 +14,11 @@ This is a simplified backport with the following changes from the original:
1414
- Removed StableValue optimizations
1515
- Removed value-based class annotations
1616
- Basic implementation without performance optimizations
17-
- Compatible with JDK 24 instead of future JDK versions
17+
- Compatible with JDK 21+ instead of future JDK versions
1818

1919
## Building
2020

21-
Requires JDK 24 (Early Access). Build with Maven:
21+
Requires JDK 21 or later. Build with Maven:
2222

2323
```bash
2424
mvn clean compile

pom.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@
1919
</licenses>
2020

2121
<properties>
22-
<maven.compiler.source>24</maven.compiler.source>
23-
<maven.compiler.target>24</maven.compiler.target>
22+
<maven.compiler.source>21</maven.compiler.source>
23+
<maven.compiler.target>21</maven.compiler.target>
2424
</properties>
2525

2626
<build>
@@ -30,8 +30,8 @@
3030
<artifactId>maven-compiler-plugin</artifactId>
3131
<version>3.8.1</version>
3232
<configuration>
33-
<source>24</source>
34-
<target>24</target>
33+
<source>21</source>
34+
<target>21</target>
3535
</configuration>
3636
</plugin>
3737
</plugins>

0 commit comments

Comments
 (0)