Skip to content

Commit db7ce6d

Browse files
authored
Include Java version 21 in tests (#37)
* include Java version 21 in tests * upgrade byte buddy for mockito
1 parent d7756dd commit db7ce6d

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

.github/workflows/lint-test-sdk.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
runs-on: ubuntu-latest
1818
strategy:
1919
matrix:
20-
java-version: ['8', '11', '17'] # Define the Java versions to test against
20+
java-version: ['8', '11', '17', '21'] # Define the Java versions to test against
2121
steps:
2222
- uses: actions/checkout@v4
2323
with:

build.gradle

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,11 @@ dependencies {
2929
testImplementation 'org.junit.jupiter:junit-jupiter'
3030
testImplementation 'org.skyscreamer:jsonassert:1.5.3'
3131
testImplementation 'commons-io:commons-io:2.11.0'
32-
testImplementation "com.google.truth:truth:1.4.4"
33-
testImplementation 'org.mockito:mockito-core:4.11.0'
32+
testImplementation 'com.google.truth:truth:1.4.4'
33+
testImplementation ('org.mockito:mockito-core:4.11.0') {
34+
exclude group: 'net.bytebuddy', module: 'byte-buddy' // mockito 4's version doesn't work with Java 21
35+
}
36+
testImplementation 'net.bytebuddy:byte-buddy:1.15.1' // Use the latest available version
3437
testImplementation 'org.mockito:mockito-inline:4.11.0'
3538
}
3639

0 commit comments

Comments
 (0)