Skip to content

Commit

Permalink
Update gradle config to run coverage validation at the end (avoid con…
Browse files Browse the repository at this point in the history
…flicts and race conditions).
  • Loading branch information
jkuester committed Jan 18, 2025
1 parent 49ea5c7 commit 01f5736
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ android {
testOptions {
unitTests.all {
it.useJUnitPlatform()
it.finalizedBy("jacocoCoverageVerification")
}
}
lint {
Expand Down Expand Up @@ -154,7 +153,6 @@ val jacocoExecutionData =
files(fileTree(layout.buildDirectory) { include(listOf("**/*.exec", "**/*.ec")) })
tasks.register<JacocoCoverageVerification>("jacocoCoverageVerification") {
dependsOn(listOf("testDebugUnitTest", "createDebugUnitTestCoverageReport"))
mustRunAfter("jacocoCoverageReport")
group = "Verification"
violationRules {
rule {
Expand All @@ -167,6 +165,7 @@ tasks.register<JacocoCoverageVerification>("jacocoCoverageVerification") {
classDirectories.setFrom(jacocoClassDirs)
executionData.setFrom(jacocoExecutionData)
}
tasks.build { finalizedBy("jacocoCoverageVerification") }
tasks.register<JacocoReport>("jacocoCoverageReport") {
dependsOn(listOf("testDebugUnitTest", "createDebugUnitTestCoverageReport"))
group = "Reporting"
Expand Down

0 comments on commit 01f5736

Please sign in to comment.