Skip to content

Commit

Permalink
java 21 support
Browse files Browse the repository at this point in the history
  • Loading branch information
renat-nosto committed Mar 20, 2024
1 parent 87fa028 commit 332b5b1
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 19 deletions.
9 changes: 3 additions & 6 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,8 @@ jobs:

strategy:
matrix:
jdk: [ 11, 17 ]
jdk: [ 17, 21 ]
os: [ubuntu-latest, windows-latest]
exclude:
- os: windows-latest
jdk: 11

name: Check / Tests -> JDK-${{ matrix.jdk }}/${{ matrix.os }}
steps:
Expand Down Expand Up @@ -69,10 +66,10 @@ jobs:
python-version: '3.x'
architecture: 'x64'

- name: Set up JDK 17
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
java-version: 17
java-version: 21
distribution: 'adopt'

- name: Build with Ant
Expand Down
4 changes: 2 additions & 2 deletions framework/dependencies.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ require: &allDependencies
- org.bouncycastle -> bcutil-jdk18on 1.77
- org.codehaus.groovy -> groovy 3.0.20
- org.codehaus.groovy -> groovy-xml 3.0.20
- org.eclipse.jdt -> org.eclipse.jdt.core 3.33.0
- org.eclipse.jdt -> ecj 3.33.0
- org.eclipse.jdt -> org.eclipse.jdt.core 3.36.0
- org.eclipse.jdt -> ecj 3.36.0
- org.hibernate -> hibernate-core 5.6.5.Final.patched
- net.bytebuddy -> byte-buddy 1.14.12
- javax.persistence -> javax.persistence-api 2.2
Expand Down
Binary file removed framework/lib/ecj-3.33.0.jar
Binary file not shown.
Binary file added framework/lib/ecj-3.36.0.jar
Binary file not shown.
Binary file removed framework/lib/org.eclipse.jdt.core-3.33.0.jar
Binary file not shown.
Binary file added framework/lib/org.eclipse.jdt.core-3.36.0.jar
Binary file not shown.
24 changes: 13 additions & 11 deletions framework/src/play/classloading/ApplicationCompiler.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,17 +34,19 @@
*/
public class ApplicationCompiler {

private static final String JAVA_SOURCE_DEFAULT_VERSION = "11";
static final Map<String, String> compatibleJavaVersions = Map.of(
"11", CompilerOptions.VERSION_11,
"12", CompilerOptions.VERSION_12,
"13", CompilerOptions.VERSION_13,
"14", CompilerOptions.VERSION_14,
"15", CompilerOptions.VERSION_15,
"16", CompilerOptions.VERSION_16,
"17", CompilerOptions.VERSION_17,
"18", CompilerOptions.VERSION_18,
"19", CompilerOptions.VERSION_19
private static final String JAVA_SOURCE_DEFAULT_VERSION = "17";
static final Map<String, String> compatibleJavaVersions = Map.ofEntries(
Map.entry("11", CompilerOptions.VERSION_11),
Map.entry("12", CompilerOptions.VERSION_12),
Map.entry("13", CompilerOptions.VERSION_13),
Map.entry("14", CompilerOptions.VERSION_14),
Map.entry("15", CompilerOptions.VERSION_15),
Map.entry("16", CompilerOptions.VERSION_16),
Map.entry("17", CompilerOptions.VERSION_17),
Map.entry("18", CompilerOptions.VERSION_18),
Map.entry("19", CompilerOptions.VERSION_19),
Map.entry("20", CompilerOptions.VERSION_20),
Map.entry("21", CompilerOptions.VERSION_21)
);

final Map<String, Boolean> packagesCache = new HashMap<>();
Expand Down

0 comments on commit 332b5b1

Please sign in to comment.