Stanislav Kral
10/23/2023, 4:06 PMimplementation(libs.foo.bar)
calls to a helper function and reuse it in individual modules?
I'd like to be able to reuse declaration of testing dependencies like this:
fun org.gradle.kotlin.dsl.DependencyHandlerScope.addTestDependencies() {
// API for writing JUnit tests
testImplementation(libs.junit.api)
testImplementation(libs.junit.params)
// IDE & Gradle integration:
testImplementation(libs.junit.platform.runner)
testImplementation(libs.kotlinx.coroutines.test)
testImplementation(libs.mockk)
testRuntimeOnly(libs.junit.engine)
testRuntimeOnly(libs.junit.vintage.engine)
testRuntimeOnly(libs.junit.launcher)
}
// JVM module build.gradle.kts
dependencies {
addTestDependencies()
}
Casey Brooks
10/23/2023, 4:09 PMStanislav Kral
10/23/2023, 4:53 PM