From df5ddc90f356531b28294e7d98424225daae6f6f Mon Sep 17 00:00:00 2001 From: Gerd Aschemann Date: Wed, 24 Jan 2024 10:05:59 +0100 Subject: [PATCH] #309 Add JUnit(5) Vintage to make all tests work again --- build.gradle | 6 ++++++ gradle/libs.versions.toml | 2 ++ 2 files changed, 8 insertions(+) diff --git a/build.gradle b/build.gradle index e64d4bec..0b379d58 100644 --- a/build.gradle +++ b/build.gradle @@ -88,6 +88,8 @@ configure(subprojects) { testImplementation platform (libs.spock) testImplementation "org.spockframework:spock-core" testImplementation "org.spockframework:spock-junit4" + + testImplementation libs.junit.vintage } java { @@ -96,6 +98,10 @@ configure(subprojects) { } } + tasks.named('test', Test) { + useJUnitPlatform() + } + // The CodeNarc plugin performs quality checks on your project’s // Groovy source files using CodeNarc and generates reports from these checks. // apply plugin: 'codenarc' diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 2c087c10..16668ed4 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,10 +1,12 @@ [versions] groovy-version = "3.0.17" +junit5-version = "5.10.1" [libraries] # Use Groovy which corresponds to Gradle version (of hsc build) groovy-bom = { module = "org.codehaus.groovy:groovy-bom", version.ref = "groovy-version" } jsoup = "org.jsoup:jsoup:1.17.2" +junit-vintage = { module = "org.junit.vintage:junit-vintage-engine", version.ref = "junit5-version" } slf4j-api = "org.slf4j:slf4j-api:2.0.11" slf4j-nop = "org.slf4j:slf4j-nop:2.0.11" spock = "org.spockframework:spock-bom:2.3-groovy-3.0"