51 lines
No EOL
1.5 KiB
Groovy
51 lines
No EOL
1.5 KiB
Groovy
subprojects { module ->
|
|
plugins.withType(JavaPlugin).whenPluginAdded {
|
|
module.test {
|
|
useJUnitPlatform()
|
|
testLogging {
|
|
events 'started', 'passed', 'skipped', 'failed'
|
|
exceptionFormat "full"
|
|
showStandardStreams true
|
|
}
|
|
}
|
|
module.tasks.configureEach { task ->
|
|
if (task.taskIdentity.type.toString() == "class org.jetbrains.kotlin.gradle.tasks.KotlinCompile") {
|
|
task.kotlinOptions {
|
|
freeCompilerArgs += "-opt-in=kotlin.RequiresOptIn"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
plugins.withId("com.android.application") {
|
|
module.android.testOptions.unitTests.all {
|
|
useJUnitPlatform()
|
|
testLogging {
|
|
events 'started', 'passed', 'skipped', 'failed'
|
|
exceptionFormat "full"
|
|
showStandardStreams true
|
|
}
|
|
}
|
|
module.android.testOptions {
|
|
unitTests {
|
|
includeAndroidResources = true
|
|
}
|
|
}
|
|
}
|
|
|
|
plugins.withId("com.android.library") {
|
|
module.android.testOptions.unitTests.all {
|
|
useJUnitPlatform()
|
|
testLogging {
|
|
events 'started', 'passed', 'skipped', 'failed'
|
|
exceptionFormat "full"
|
|
showStandardStreams true
|
|
}
|
|
}
|
|
module.android.testOptions {
|
|
unitTests {
|
|
includeAndroidResources = true
|
|
}
|
|
}
|
|
}
|
|
} |