diff --git a/build.gradle b/build.gradle index 11a1cfd..a0cda34 100644 --- a/build.gradle +++ b/build.gradle @@ -14,8 +14,8 @@ repositories { } dependencies { - testImplementation 'org.junit.jupiter:junit-jupiter-api:5.14.4', 'org.junit.jupiter:junit-jupiter-params:5.14.4', 'org.json:json:20250517' - testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.14.4', 'org.junit.platform:junit-platform-launcher' + testImplementation 'org.junit.jupiter:junit-jupiter-api:6.1.3', 'org.junit.jupiter:junit-jupiter-params:6.1.3', 'org.json:json:20250517' + testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:6.1.3', 'org.junit.platform:junit-platform-launcher' implementation 'dev.personnummer:personnummer:3.5.0' } @@ -35,6 +35,13 @@ java { targetCompatibility = 1.8 } +// JUnit 6 requires Java 17+. Only the tests are built for it; the published +// library keeps its Java 8 target. +tasks.named('compileTestJava') { + sourceCompatibility = '17' + targetCompatibility = '17' +} + artifacts { archives javadocJar, sourcesJar, jar }