Skip to content

Commit 37d606c

Browse files
committed
HBX-3322: Update the Java compiler to be used for GitHub actions and in Jenkins to version 17
- JDK 17 is selected in the Jenkins file and in the GitHub actions file - Java Release 11 is used in pom.xml and in 'gradle/plugins/build.gradle' to keep compatiblity with Java 11 Signed-off-by: Koen Aers <koen.aers@gmail.com>
1 parent c4d0f77 commit 37d606c

File tree

4 files changed

+27
-5
lines changed

4 files changed

+27
-5
lines changed

.github/workflows/build_test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@ jobs:
1818
ref: ${{ github.event.pull_request.head.sha }}
1919
fetch-depth: 0
2020

21-
- name: Setup Java 11
21+
- name: Setup Java 17
2222
uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0
2323
with:
24-
java-version: 11
24+
java-version: 17
2525
distribution: temurin
2626

2727
- name: Build and Test

ci/release/Jenkinsfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ pipeline {
2727
}
2828
tools {
2929
maven 'Apache Maven 3.9'
30-
jdk 'OpenJDK 11 Latest'
30+
jdk 'OpenJDK 17 Latest'
3131
}
3232
options {
3333
buildDiscarder logRotator(daysToKeepStr: '30', numToKeepStr: '10')

gradle/plugin/build.gradle

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ project.description = 'Gradle plugin to provide hibernate-tools reverse engineer
1212

1313
java {
1414
toolchain {
15-
languageVersion = JavaLanguageVersion.of(11)
15+
languageVersion = JavaLanguageVersion.of(17)
1616
}
1717
}
1818

@@ -81,6 +81,10 @@ tasks.named('publishPlugins') {
8181
}
8282
}
8383

84+
tasks.withType(JavaCompile).configureEach {
85+
options.release = 11
86+
}
87+
8488
tasks.withType(Test) {
8589
testLogging {
8690
// set options for log level LIFECYCLE

test/nodb/pom.xml

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,5 +58,23 @@
5858
<artifactId>junit-jupiter-engine</artifactId>
5959
</dependency>
6060
</dependencies>
61-
61+
62+
<build>
63+
<plugins>
64+
<plugin>
65+
<groupId>org.apache.maven.plugins</groupId>
66+
<artifactId>maven-surefire-plugin</artifactId>
67+
<configuration>
68+
<argLine>
69+
--add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED
70+
--add-exports=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED
71+
--add-exports=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED
72+
--add-exports=jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED
73+
--add-exports=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED
74+
--add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED </argLine>
75+
</configuration>
76+
</plugin>
77+
</plugins>
78+
</build>
79+
6280
</project>

0 commit comments

Comments
 (0)