Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[HEALTH-1002] Java 21 take 2 #69

Merged
merged 4 commits into from
Jun 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
6 changes: 6 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,12 @@ jobs:
language: [ 'java-kotlin', 'javascript-typescript', 'python' ]

steps:
- name: Setup Java JDK
uses: actions/setup-java@v4
with:
java-version: 17
distribution: 'adopt'

- name: Checkout repository
uses: actions/checkout@v4

Expand Down
6 changes: 3 additions & 3 deletions framework/build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@

<target name="compile" description="compile without cleaning">
<mkdir dir="classes"/>
<javac encoding="utf-8" srcdir="src" destdir="classes" debug="true" source="11" target="11">
<javac encoding="utf-8" srcdir="src" destdir="classes" debug="true" source="17" target="17">
<classpath refid="project.classpath" />
</javac>
<copy todir="classes">
Expand Down Expand Up @@ -233,7 +233,7 @@
<!-- Tests -->

<target name="compile-tests" depends="compile">
<javac encoding="utf-8" nowarn="${compile.nowarn}" debug="true" destdir="classes" classpathref="project.classpath" srcdir="tests/src" source="11" target="11">
<javac encoding="utf-8" nowarn="${compile.nowarn}" debug="true" destdir="classes" classpathref="project.classpath" srcdir="tests/src" source="17" target="17">
<include name="**/*.java"/>
</javac>
</target>
Expand Down Expand Up @@ -376,7 +376,7 @@

<target name="compile-unittest" depends="compile">
<mkdir dir="test-classes"/>
<javac encoding="utf-8" srcdir="test-src" destdir="test-classes" debug="true" source="11" target="11">
<javac encoding="utf-8" srcdir="test-src" destdir="test-classes" debug="true" source="17" target="17">
<classpath refid="classpath.test" />
</javac>
<copy todir="test-classes">
Expand Down
4 changes: 2 additions & 2 deletions framework/dependencies.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,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
- net.bytebuddy -> byte-buddy 1.14.12
- io.smallrye -> jandex 3.1.6
- org.jboss.logging -> jboss-logging 3.5.3.Final
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),
Comment on lines +39 to +44

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

silly question: shouldn't these go away?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if this is what you merged from the public one, I'm ok with keeping it aligned

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