Skip to content

Commit 2b7c019

Browse files
committed
Update JUnit Platform version to 5.14.3
1 parent 2b0195e commit 2b7c019

3 files changed

Lines changed: 20 additions & 2 deletions

File tree

gradle/build-logic/src/main/kotlin/net/kautler/tests.gradle.kts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,7 @@ testing {
9595
useSpock(libs.versions.test.spock)
9696

9797
dependencies {
98+
implementation(platform(libs.test.junit.bom))
9899
implementation(libs.test.powermock.reflect)
99100
implementation(libs.test.weld.spock)
100101
implementation(libs.test.weld.junit.common)
@@ -197,6 +198,7 @@ testing {
197198
requireFeature("spock")
198199
}
199200
}
201+
implementation(platform(libs.test.junit.bom))
200202
implementation(libs.cdi.api)
201203
implementation(platform(libs.test.log4j.bom))
202204
implementation(libs.test.log4j.core.test) { isTransitive = false }
@@ -317,6 +319,7 @@ dependencies {
317319

318320
val pitestImplementation by configurations.existing
319321
pitestImplementation(libs.test.pitest.entry)
322+
pitestImplementation(platform(libs.test.junit.bom))
320323
pitestImplementation(libs.test.junit.platform.launcher)
321324

322325
val spockCompileOnly by configurations.existing

gradle/build-logic/src/main/kotlin/net/kautler/versions.gradle.kts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,20 @@ tasks.dependencyUpdates {
181181
reject("Minimum supported version is Java 11")
182182
}
183183

184+
if ((candidate.group == libs.test.junit.bom.get().group) &&
185+
(candidate.module == libs.test.junit.bom.get().name) &&
186+
(candidate.version.substringBefore(".").toInt() > 5)
187+
) {
188+
reject("Minimum supported version is Java 17")
189+
}
190+
191+
if ((candidate.group == libs.test.junit.platform.launcher.get().group) &&
192+
(candidate.module == libs.test.junit.platform.launcher.get().name) &&
193+
(candidate.version.substringBefore(".").toInt() > 5)
194+
) {
195+
reject("Minimum supported version is Java 17")
196+
}
197+
184198
// branches above already rejected with appropriate reason
185199
return@rejectVersionIf false
186200
}

gradle/libs.versions.toml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ test-byteBuddy = "1.18.7"
4747
test-discordWebhooks = "0.8.4"
4848
test-groovy = "4.0.31"
4949
test-jansi = "1.18"
50-
test-junit-platform = "1.9.0"
50+
test-junit = "5.14.3"
5151
test-objenesis = "3.5"
5252
test-pitest = "1.23.0"
5353
test-pitest-java = "11"
@@ -88,7 +88,8 @@ test-groovy = { module = "org.apache.groovy:groovy", version.ref = "test-groovy"
8888
test-jansi = { module = "org.fusesource.jansi:jansi", version.ref = "test-jansi" }
8989
test-javacord = { module = "org.javacord:javacord", version.ref = "javacord" }
9090
test-javacord-core = { module = "org.javacord:javacord-core", version.ref = "javacord" }
91-
test-junit-platform-launcher = { module = "org.junit.platform:junit-platform-launcher", version.ref = "test-junit-platform" }
91+
test-junit-bom = { module = "org.junit:junit-bom", version.ref = "test-junit" }
92+
test-junit-platform-launcher = { module = "org.junit.platform:junit-platform-launcher" }
9293
test-log4j-bom = { module = "org.apache.logging.log4j:log4j-bom", version.ref = "log4j" }
9394
test-log4j-core = { module = "org.apache.logging.log4j:log4j-core" }
9495
test-log4j-core-test = { module = "org.apache.logging.log4j:log4j-core-test" }

0 commit comments

Comments
 (0)