mbonnin
06/21/2024, 11:12 PMkotlin-test
as a commonMain
dependency makes compileTestKotlinJvm
fail with Unresolved reference 'kotlin.test.Test'
? Is that expected?ephemient
06/21/2024, 11:15 PMkotlin-test-junit5
or one of the other variants to `avtual`ize the `expect`ed types on JVMephemient
06/21/2024, 11:16 PMcommonTest
, maybe it doesn't work if you put it in commonMain
mbonnin
06/21/2024, 11:18 PMmbonnin
06/21/2024, 11:19 PMgetByName("commonMain") {
dependencies {
implementation("org.jetbrains.kotlin:kotlin-test")
}
}
getByName("commonTest") {
dependencies {
implementation("org.jetbrains.kotlin:kotlin-test")
}
}
mbonnin
06/21/2024, 11:19 PMgetByName("commonMain") {
dependencies {
implementation("org.jetbrains.kotlin:kotlin-test")
}
}
getByName("commonTest") {
dependencies {
implementation("org.jetbrains.kotlin:kotlin-test-junit5")
}
}
ephemient
06/21/2024, 11:21 PMcommonTest {
dependencies {
implementation(kotlin("test"))
}
}
jvmTest {
dependencies {
implementation(kotlin("test-junit5"))
}
}
and I guess you're doing it in commonMain
for some reason instead of commonTest
, but then I'd put the JVM dependency in jvmMain
mbonnin
06/21/2024, 11:23 PMassertFoo
in commonMain
because this is code that I want to publish and use from other tests. Ideally I would use test fixtures but haven’t been able to so farmbonnin
06/21/2024, 11:33 PMkotlin-test
to commonMain
triggers maybeAddTestDependencyCapability “earlier” (testCapability
is null there) and therefore prevents the automatic adding of kotlin-test-junit5
mbonnin
06/21/2024, 11:35 PM