How can I reformulate:
testCompile.extendsFrom compileOnly
of the Gradle Groovy DSL to its Kotlin-based equivalent?
configurations {
testCompile{
extendsFrom(compileOnly)
}
}
My approach above fails.
How can I reformulate:
testCompile.extendsFrom compileOnly
of the Gradle Groovy DSL to its Kotlin-based equivalent?
configurations {
testCompile{
extendsFrom(compileOnly)
}
}
My approach above fails.
configurations {
create("testCompile").apply {
extendsFrom(configurations.compileOnly.get())
}
}
If you want to change an already existing config use
configurations.testImplementation.get().extendsFrom(configurations.compileOnly.get())
if you deal with custom tasks or test suites, you can call:
configurations {
val integrationTestImplementation by getting {
extendsFrom(configurations.implementation.get())
}
}
© 2022 - 2024 — McMap. All rights reserved.