I have platform independent tests (using expect/actual) in commonTest. Those tests are ignored by androidInstrumentedTest unless I make it depend on commonTest. Is this the right way to achieve shared testing?
Doing this in gradle...
val androidInstrumentedTest by getting {
dependsOn(getByName("commonTest"))
dependencies {
implementation(libs.androidx.junit.ktx)
implementation(libs.androidx.espresso.core)
implementation(libs.androidx.test.runner)
implementation(libs.androidx.test.rules)
implementation(libs.androidx.test.junit)
implementation(libs.koin.test)
implementation(libs.koin.test.junit4)
implementation(libs.kotlinx.coroutines.test)
}
}
causes this warning:
The Default Kotlin Hierarchy Template was not applied to 'project ':shared'':
Explicit .dependsOn() edges were configured for the following source sets:
[androidInstrumentedTest]
Consider removing dependsOn-calls or disabling the default template by adding
'kotlin.mpp.applyDefaultHierarchyTemplate=false'
to your gradle.properties