The verification rule declared just under koverReport
is not applied to koverVerify*
tasks of any Android build variant.
- 0.7.3
- Clone this repository
- Run following verification tasks
:app:koverVerifyDebug
:app:koverVerifyRelease
:app:koverVerify
- Check task outputs
Kover configuration is here
All verification tasks fail with the following message:
Rule violated: lines covered percentage is 6.451600, but expected minimum is 10
./gradlew :app:koverVerifyDebug
: verification passed and there is no error message ❌./gradlew :app:koverVerifyRelease
: verification failed as expected ✅./gradlew :app:koverVerify
: verification failed as expected ✅
- JDK 17+
- Android Studio Giraffe Patch 1 or later (if you run this project on Android Studio)
:app
: application module- build variants:
debug
andrelease
- build variants:
From app/build.gradle.kts
koverReport {
verify {
rule {
minBound(10)
}
}
defaults {
mergeWith("debug")
}
androidReports("release") {
// note: `koverVerifyRelease` will also pass when removing following rule,
// which means the above rule is not applied to the variant `release` too
verify {
rule {
minBound(10)
}
}
}
}