Created
April 12, 2023 10:50
-
-
Save hoc081098/483ddf84697b90edb98acb932a02e4f8 to your computer and use it in GitHub Desktop.
kover
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
subprojects { | |
apply<KoverPlugin>() | |
afterEvaluate { | |
tasks.withType<Test> { | |
testLogging { | |
showExceptions = true | |
showCauses = true | |
showStackTraces = true | |
showStandardStreams = true | |
events = EnumSet.of( | |
TestLogEvent.PASSED, | |
TestLogEvent.FAILED, | |
TestLogEvent.SKIPPED, | |
TestLogEvent.STANDARD_OUT, | |
TestLogEvent.STANDARD_ERROR | |
) | |
exceptionFormat = TestExceptionFormat.FULL | |
} | |
} | |
} | |
afterEvaluate { | |
val project = this | |
extensions.findByType<com.android.build.api.dsl.LibraryExtension>()?.run { | |
println("$project: config for project") | |
testOptions { | |
unitTests { | |
isReturnDefaultValues = true | |
all { test -> | |
println("$project: test ${test.name} ") | |
test.extensions.configure<kotlinx.kover.api.KoverTaskExtension> { | |
isDisabled.set(test.name != "testDebugUnitTest") | |
} | |
} | |
} | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment