Skip to content

Commit 2b79bdf

Browse files
committed
build: Ensure compatibility with newer Java versions
Java changed the way how it processes annotations: ``` As of JDK 23, annotation processing is only run with some explicit configuration of annotation processing or with an explicit request to run annotation processing on the javac command line. ``` this messes with lombok, this compiler configuration will change the default behavior, so it works with java 23 Signed-off-by: Simon Schrottner <[email protected]>
1 parent 46f0c7b commit 2b79bdf

File tree

4 files changed

+23
-14
lines changed

4 files changed

+23
-14
lines changed

Diff for: .github/workflows/ci.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
matrix:
1515
os: [ubuntu-latest]
1616
build:
17-
- java: 17
17+
- java: 21
1818
profile: codequality
1919
- java: 8
2020
profile: java8

Diff for: .github/workflows/release-please.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@ jobs:
1919
if: ${{ steps.release.outputs.releases_created }}
2020
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
2121

22-
- name: Set up JDK 17
22+
- name: Set up JDK 21
2323
if: ${{ steps.release.outputs.releases_created }}
2424
uses: actions/setup-java@3a4f6e1af504cf6a31855fa899c6aa5355ba6c12 # v4
2525
with:
26-
java-version: '17'
26+
java-version: '21'
2727
distribution: 'temurin'
2828
cache: maven
2929
server-id: ossrh

Diff for: pom.xml

+20-10
Original file line numberDiff line numberDiff line change
@@ -49,13 +49,13 @@
4949
</scm>
5050

5151
<properties>
52-
<toolchain.jdk.version>[17,)</toolchain.jdk.version>
53-
<junit.jupiter.version>5.11.4</junit.jupiter.version>
52+
<toolchain.jdk.version>[21,)</toolchain.jdk.version>
53+
<junit.version>5.11.4</junit.version>
5454
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
5555
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
5656
<module-name>${groupId}.${artifactId}</module-name>
5757
<io.cucumber.version>7.21.1</io.cucumber.version>
58-
<org.mockito.version>5.2.0</org.mockito.version>
58+
<org.mockito.version>5.15.2</org.mockito.version>
5959
<javadoc.failOnWarnings>true</javadoc.failOnWarnings>
6060
<!-- This is required for later correct replacement of surefireArgLine -->
6161
<!-- see surefire-java8 and surefire-java9+ profiles -->
@@ -65,9 +65,21 @@
6565
</surefireArgLine>
6666
<skip.tests>false</skip.tests>
6767
<!-- this will throw an error if we use APIs not available in the specified version -->
68-
<maven.compiler.release>8</maven.compiler.release>
68+
<maven.compiler.release>8</maven.compiler.release>
6969
</properties>
7070

71+
<dependencyManagement>
72+
<dependencies>
73+
<dependency>
74+
<groupId>org.junit</groupId>
75+
<artifactId>junit-bom</artifactId>
76+
<version>5.12.0</version>
77+
<type>pom</type>
78+
<scope>import</scope>
79+
</dependency>
80+
</dependencies>
81+
</dependencyManagement>
82+
7183
<dependencies>
7284
<dependency>
7385
<!-- provided -->
@@ -140,35 +152,30 @@
140152
<dependency>
141153
<groupId>org.junit.jupiter</groupId>
142154
<artifactId>junit-jupiter</artifactId>
143-
<version>${junit.jupiter.version}</version>
144155
<scope>test</scope>
145156
</dependency>
146157

147158
<dependency>
148159
<groupId>org.junit.jupiter</groupId>
149160
<artifactId>junit-jupiter-engine</artifactId>
150-
<version>${junit.jupiter.version}</version>
151161
<scope>test</scope>
152162
</dependency>
153163

154164
<dependency>
155165
<groupId>org.junit.jupiter</groupId>
156166
<artifactId>junit-jupiter-api</artifactId>
157-
<version>${junit.jupiter.version}</version>
158167
<scope>test</scope>
159168
</dependency>
160169

161170
<dependency>
162171
<groupId>org.junit.jupiter</groupId>
163172
<artifactId>junit-jupiter-params</artifactId>
164-
<version>${junit.jupiter.version}</version>
165173
<scope>test</scope>
166174
</dependency>
167175

168176
<dependency>
169177
<groupId>org.junit.platform</groupId>
170178
<artifactId>junit-platform-suite</artifactId>
171-
<version>1.11.4</version>
172179
<scope>test</scope>
173180
</dependency>
174181

@@ -189,7 +196,7 @@
189196
<dependency>
190197
<groupId>org.mockito</groupId>
191198
<artifactId>mockito-inline</artifactId>
192-
<version>${org.mockito.version}</version>
199+
<version>5.2.0</version>
193200
<scope>test</scope>
194201
</dependency>
195202

@@ -401,6 +408,9 @@
401408
<activation>
402409
<activeByDefault>true</activeByDefault>
403410
</activation>
411+
<properties>
412+
<maven.compiler.proc>full</maven.compiler.proc>
413+
</properties>
404414
<build>
405415
<plugins>
406416
<!-- CODE QUALITY TOOLS -->

Diff for: tools/junit-openfeature/pom.xml

-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@
3535
<dependency>
3636
<groupId>org.junit.jupiter</groupId>
3737
<artifactId>junit-jupiter-api</artifactId>
38-
<version>${junit.jupiter.version}</version>
3938
</dependency>
4039

4140
<dependency>

0 commit comments

Comments
 (0)