Stephen Edwards
11/22/2024, 8:38 PMtestRuntimeOnly
dependency using the https://github.com/JetBrains/kotlin/blob/master/libraries/tools/kotlin-gradle-plug[…]n/org/jetbrains/kotlin/gradle/plugin/KotlinDependencyHandler.kt? Is it in the configuration?Javier
11/22/2024, 8:47 PMtestRuntimeOnly
is
sourceSets.test.dependencies {
runtimeOnly(...)
}
Another trick that probably work is
dependencies {
"testRuntimeOnly"(...) // check that is `invoke` over a String with `"`
}
Stephen Edwards
11/22/2024, 9:00 PMStephen Edwards
11/22/2024, 9:08 PMJavier
11/22/2024, 9:10 PMconfigurations
ephemient
11/22/2024, 11:34 PMephemient
11/22/2024, 11:37 PMkotlin {
sourceSets {
commonTest
androidUnitTest
androidInstrumentedTest
ephemient
11/22/2024, 11:37 PMStephen Edwards
11/22/2024, 11:38 PMephemient
11/22/2024, 11:40 PMStephen Edwards
11/22/2024, 11:43 PMStephen Edwards
11/22/2024, 11:44 PMStephen Edwards
11/22/2024, 11:44 PMStephen Edwards
11/22/2024, 11:45 PMephemient
11/22/2024, 11:45 PMfoo { bar { baz() } }
or as values foo.bar.baz()
(and regardless of Kotlin or Groovy DSL)Stephen Edwards
11/23/2024, 12:06 AMStephen Edwards
11/25/2024, 3:08 PMStephen Edwards
11/25/2024, 3:08 PMtarget.configurations.names.forEach { configName ->
kotlin.sourceSets.getByName(configName).dependencies {
compileOnly(target.citeApiDependency())
}
}
Stephen Edwards
11/25/2024, 3:09 PMStephen Edwards
11/25/2024, 3:09 PMtarget.configurations.names.forEach { configName ->
if (configName.contains("androidTest")) {
kotlin.sourceSets.getByName(configName).dependencies {
compileOnly(target.citeApiDependency())
}
}
}
Stephen Edwards
11/25/2024, 3:11 PM