Enable unit testing of Java 20 and 21

This commit is contained in:
James Hamilton
2023-10-12 12:59:11 +02:00
parent 76cf000348
commit 7c153f8eec

View File

@@ -50,7 +50,7 @@ jar {
// Early access automatic downloads are not yet supported:
// https://github.com/gradle/gradle/issues/14814
// But it will work if e.g. Java N-ea is pre-installed
def javaVersionsForTest = 9..19
def javaVersionsForTest = 9..21
test {
useJUnitPlatform()
@@ -65,7 +65,7 @@ task testAllJavaVersions() { testAllTask ->
ignoreFailures = true
// The version of bytebuddy used by mockk only supports Java 20 experimentally so far
if (version == 20) systemProperty 'net.bytebuddy.experimental', true
if (version >= 20) systemProperty 'net.bytebuddy.experimental', true
testAllTask.dependsOn(it)