CLOVIS
03/27/2026, 1:56 PM* What went wrong:
Execution failed for task ':gradle:templates:template-app:jvmTest'.
> Test process encountered an unexpected problem.
> Could not complete execution for Gradle Test Executor 2.
Caused by: org.junit.platform.commons.JUnitException: TestEngine with ID 'kotest' failed to discover tests
at app//org.junit.platform.launcher.core.EngineDiscoveryOrchestrator.discoverEngineRoot(EngineDiscoveryOrchestrator.java:208)
at app//org.junit.platform.launcher.core.EngineDiscoveryOrchestrator.discoverSafely(EngineDiscoveryOrchestrator.java:174)
at app//org.junit.platform.launcher.core.EngineDiscoveryOrchestrator.discover(EngineDiscoveryOrchestrator.java:119)
at app//org.junit.platform.launcher.core.EngineDiscoveryOrchestrator.discover(EngineDiscoveryOrchestrator.java:84)
at app//org.junit.platform.launcher.core.DefaultLauncher.discover(DefaultLauncher.java:104)
at app//org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:91)
at app//org.junit.platform.launcher.core.DelegatingLauncher.execute(DelegatingLauncher.java:47)
at app//org.junit.platform.launcher.core.InterceptingLauncher.lambda$execute$1(InterceptingLauncher.java:39)
at app//org.junit.platform.launcher.core.ClasspathAlignmentCheckingLauncherInterceptor.intercept(ClasspathAlignmentCheckingLauncherInterceptor.java:25)
at app//org.junit.platform.launcher.core.InterceptingLauncher.execute(InterceptingLauncher.java:38)
at app//org.junit.platform.launcher.core.DelegatingLauncher.execute(DelegatingLauncher.java:47)
at org.gradle.api.internal.tasks.testing.junitplatform.JUnitPlatformTestDefinitionProcessor$CollectThenExecuteTestDefinitionConsumer.processAllTestClasses(JUnitPlatformTestDefinitionProcessor.java:172)
at org.gradle.api.internal.tasks.testing.junitplatform.JUnitPlatformTestDefinitionProcessor$CollectThenExecuteTestDefinitionConsumer.access$000(JUnitPlatformTestDefinitionProcessor.java:121)
at org.gradle.api.internal.tasks.testing.junitplatform.JUnitPlatformTestDefinitionProcessor.stop(JUnitPlatformTestDefinitionProcessor.java:114)
at org.gradle.api.internal.tasks.testing.SuiteTestDefinitionProcessor.stop(SuiteTestDefinitionProcessor.java:64)
... 15 more
Caused by: java.lang.NoSuchMethodError: 'void io.kotest.core.LoggerKt.log(kotlin.jvm.functions.Function0)'
at io.kotest.runner.junit.platform.discovery.Discovery.discover(Discovery.kt:34)
at io.kotest.runner.junit.platform.KotestJunitPlatformTestEngine.discover(KotestJunitPlatformTestEngine.kt:109)
at io.kotest.runner.junit.platform.KotestJunitPlatformTestEngine.discover(KotestJunitPlatformTestEngine.kt:29)
at org.junit.platform.launcher.core.EngineDiscoveryOrchestrator.discoverEngineRoot(EngineDiscoveryOrchestrator.java:195)
... 29 more
Repository: https://gitlab.com/opensavvy/playgrounds/gradlesam
03/27/2026, 2:33 PMCLOVIS
03/27/2026, 2:46 PM./gradlew :gradle:templates:template-app:dependencyInsight --dependency 'io.kotest:kotest-assertions-core' --configuration jvmTestRuntimeClasspath
io.kotest:kotest-assertions-core:6.1.9
\--- jvmTestRuntimeClasspath
io.kotest:kotest-assertions-core:6.1.4 -> 6.1.9
\--- io.kotest:kotest-runner-junit-platform-jvm:6.1.4
\--- io.kotest:kotest-runner-junit-platform:6.1.4
\--- io.kotest:kotest-runner-junit5-jvm:6.1.4
\--- io.kotest:kotest-runner-junit5:6.1.4
\--- dev.opensavvy.prepared:runner-kotest-jvm:2.5.0
\--- dev.opensavvy.prepared:runner-kotest:2.5.0
\--- jvmTestRuntimeClasspath
and same output with kotest-framework
Prepared is pulling the old version but Gradle correctly upgrades it so it shouldn't be a problem?sam
03/27/2026, 2:50 PMCaused by: java.lang.NoSuchMethodError: 'void io.kotest.core.LoggerKt.log(kotlin.jvm.functions.Function0)'sam
03/27/2026, 2:50 PMCLOVIS
03/27/2026, 2:51 PMCLOVIS
03/27/2026, 2:51 PMCaused by: java.lang.NoSuchMethodError: 'void io.kotest.core.LoggerKt.log(kotlin.jvm.functions.Function0)'
at io.kotest.runner.junit.platform.discovery.Discovery.discover(Discovery.kt:34)
at io.kotest.runner.junit.platform.KotestJunitPlatformTestEngine.discover(KotestJunitPlatformTestEngine.kt:109)CLOVIS
03/27/2026, 2:51 PMsam
03/27/2026, 2:51 PMsam
03/27/2026, 2:52 PMCLOVIS
03/27/2026, 2:52 PMCLOVIS
03/27/2026, 2:53 PMCLOVIS
03/27/2026, 2:54 PMsam
03/27/2026, 2:55 PMsam
03/27/2026, 2:55 PMCLOVIS
03/27/2026, 2:59 PMjvmTestRuntimeClasspath - Runtime classpath of 'jvm/test'.
+--- dev.opensavvy.prepared:runner-kotest:2.5.0
| \--- dev.opensavvy.prepared:runner-kotest-jvm:2.5.0
| +--- io.kotest:kotest-runner-junit5:6.1.4
| | \--- io.kotest:kotest-runner-junit5-jvm:6.1.4
| | +--- io.kotest:kotest-common:6.1.4 -> 6.1.9
| | | \--- io.kotest:kotest-common-jvm:6.1.9
| | +--- io.kotest:kotest-framework-engine:6.1.4 -> 6.1.9
| | | \--- io.kotest:kotest-framework-engine-jvm:6.1.9
| | | +--- io.kotest:kotest-common:6.1.9 (*)
| | +--- io.kotest:kotest-runner-junit-platform:6.1.4
| | | \--- io.kotest:kotest-runner-junit-platform-jvm:6.1.4
| | | +--- io.kotest:kotest-common:6.1.4 -> 6.1.9 (*)
| | | +--- io.kotest:kotest-framework-engine:6.1.4 -> 6.1.9 (*)
| | +--- org.jetbrains.kotlinx:kotlinx-coroutines-core:1.10.2 (*)
| +--- io.kotest:kotest-framework-engine:6.1.4 -> 6.1.9 (*)
+--- io.kotest:kotest-framework-engine:6.1.9 (*)
+--- io.kotest:kotest-assertions-core:6.1.9 (*)
+--- org.jetbrains.kotlin:kotlin-test:2.3.10 (*)
\--- org.jetbrains.kotlin:kotlin-test:2.3.10 (*)CLOVIS
03/27/2026, 3:01 PMio.kotest:kotest-runner-junit5-jvm:6.1.4, but the module explicitly specifies io.kotest:kotest-framework-engine:6.1.9 and io.kotest:kotest-assertions-core:6.1.9. Because of that, both get upgraded, but the module doesn't explicitly specify kotest-runner-junit5 so that one is out of date.CLOVIS
03/27/2026, 3:01 PMsam
03/27/2026, 3:01 PMsam
03/27/2026, 3:02 PMsam
03/27/2026, 3:05 PMCLOVIS
03/27/2026, 3:05 PMrunner-junit5 and a newer framework ? (not a critique, just making sure)sam
03/27/2026, 3:07 PMio.kotest modules should be bumped in lockstep. I think we can add a spring style dependency plugin that does it all for you actually. What do you think ?CLOVIS
03/27/2026, 3:07 PMwhy doesn't engine bring in junit runnerNo, dependencies and dependencies constraints are different. What I'm suggesting is that
kotest-framework:x.y should declare a constraint that it is only compatible with kotest-runner-junit5:x.y . If the user has an older version of kotest-runner-junit5 , Gradle will align it with the version of kotest-framework automaticallysam
03/27/2026, 3:07 PMsam
03/27/2026, 3:08 PMCLOVIS
03/27/2026, 3:08 PMi don't know why that would be desired, all theIt's not desired, it happened by accident here because I'm pulling Prepared which has a transitive dependency on all modules, but I only declare some of them explicitly in user modules. However in the same reason, users of any test framework other than Kotest that decide to use one Kotest module (e.g. kotest-property) would have the same issue and would need to explicitly specify all Kotest modulesmodules should be bumped in lockstep.io.kotest
CLOVIS
03/27/2026, 3:09 PMsam
03/27/2026, 3:09 PMsam
03/27/2026, 3:09 PMCLOVIS
03/27/2026, 3:11 PM// kotest-framework/build.gradle.kts
kotlin {
jvm()
…
sourceSets.commonMain.dependencies {
constraints {
api(projects.kotlinRunnerJunit5)
// …and all other modules which don't support forward compatibility
}
}
}
but I think KGP doesn't expose the constraints {} block in multiplatform source sets 😕CLOVIS
03/27/2026, 3:12 PMCLOVIS
03/27/2026, 3:12 PMsam
03/27/2026, 3:12 PMCLOVIS
03/27/2026, 3:12 PMCLOVIS
03/27/2026, 3:12 PMsam
03/27/2026, 3:12 PM