From 105f78fe283f9676ff8eeb46e97b265de08751f5 Mon Sep 17 00:00:00 2001 From: Alexander Yevsyukov Date: Wed, 2 Sep 2026 19:39:43 +0100 Subject: [PATCH] Derive the JUnit platform version from `JUnit.version` MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `JUnit.Platform.version` repeated the JUnit version as a literal, so a JUnit bump had to be applied in two places. The most recent one, to `6.1.3`, happened to be applied to both; nothing enforces that. `JUnit.Jupiter.version` already reads `JUnit.version`, so this only makes `Platform` follow the sibling it sits next to. Safe because JUnit 6 unified the two version lines: `junit-bom:6.1.3` declares `junit-platform-launcher:6.1.3`. Under JUnit 5 they genuinely differed — the platform was `1.x` against Jupiter's `5.x` — so the KDoc now records why the values may be tied together. Co-Authored-By: Claude Opus 5 --- buildSrc/src/main/kotlin/io/spine/dependency/test/JUnit.kt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/buildSrc/src/main/kotlin/io/spine/dependency/test/JUnit.kt b/buildSrc/src/main/kotlin/io/spine/dependency/test/JUnit.kt index aee3790c..c2edea11 100644 --- a/buildSrc/src/main/kotlin/io/spine/dependency/test/JUnit.kt +++ b/buildSrc/src/main/kotlin/io/spine/dependency/test/JUnit.kt @@ -88,8 +88,13 @@ object JUnit : DependencyWithBom() { * * So when we use JUnit as a platform, this property should be picked up * for the dependencies automatically. + * + * Since JUnit 6 the platform shares the version line of JUnit itself, + * so this property mirrors [JUnit.version] rather than repeating it. + * Under JUnit 5 the two differed — the platform was `1.x` while + * Jupiter was `5.x`. */ - override val version: String = "6.1.3" + override val version: String = JUnit.version override val group = "org.junit.platform" private const val infix = "junit-platform"