From 9feef6ac2d06c90fb275792e85476b89cae08c1f Mon Sep 17 00:00:00 2001 From: Rasmus Graham <2124386+rasmusbe@users.noreply.github.com> Date: Thu, 12 Nov 2026 22:27:27 +0100 Subject: [PATCH] chore(deps): update JUnit to 6 --- build.gradle | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) 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 }