Luis Mirabal
06/03/2025, 9:54 AMjunit-platform-launcher
. That guide also points to the Gradle 8 upgrade guide, and it says to fix it you should have the following in your dependencies:
dependencies {
testImplementation 'org.junit.jupiter:junit-jupiter:5.9.2'
testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
}
I was surprised to see that it worked as I'm not sure how Gradle resolves the version for the junit-platform-launcher
. I thought you needed a platform dependency to leave versions out.
How is the version resolve in that case? And is it actually a good practice?Vampire
06/03/2025, 10:03 AMLuis Mirabal
06/03/2025, 10:23 AMVampire
06/03/2025, 10:24 AMimplementation
vs. runtimeOnly
?Luis Mirabal
06/03/2025, 10:24 AMVampire
06/03/2025, 10:25 AMruntimeClasspath
extends from implementation
and runtimeOnly
.
runtimeClasspath
is the resolvable configuration that is resolved.
So there the platform is present and thus effective.Vampire
06/03/2025, 10:25 AMruntimeOnly
but not from implementation
, resolution would fail.Luis Mirabal
06/03/2025, 10:26 AM