Use Gradle's configuration avoidance API

This commit is contained in:
cketti 2023-01-24 19:09:37 +01:00
parent 771c68816e
commit d65864d2a0

View file

@ -21,7 +21,7 @@ def javaVersion = JavaVersion.VERSION_11
def jvmTargetVersion = JvmTarget.JVM_11
allprojects {
configurations.all {
configurations.configureEach {
resolutionStrategy.dependencySubstitution {
substitute module("androidx.core:core") using module("androidx.core:core:${libs.versions.androidxCore.get()}")
substitute module("androidx.activity:activity") using module("androidx.activity:activity:${libs.versions.androidxActivity.get()}")
@ -80,7 +80,7 @@ allprojects {
}
}
tasks.withType(Test) {
tasks.withType(Test).configureEach {
testLogging {
exceptionFormat "full"
showCauses true
@ -89,7 +89,7 @@ allprojects {
}
}
tasks.withType(KotlinCompile) {
tasks.withType(KotlinCompile).configureEach {
compilerOptions {
jvmTarget = jvmTargetVersion
}