You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
0.9.10: 0% coverage with Gradle configuration cache - testTaskOutcomes (#830) evaluated at configuration time #831
Since 0.9.10 (PR #830, fix for #827), AbstractVariantArtifacts builds testTaskOutcomes with project.provider { tests.associate { ... to test.outcome() } }, and outcome() reads Task.state. With org.gradle.configuration-cache=true, Gradle evaluates this provider when it stores the cache entry, before any task runs. Every test task is therefore recorded as NOT_EXECUTED, KoverArtifactGenerationTask filters out all binary reports, and the reports and verification show 0% coverage (kover/<variant>.artifact lists no .ic file although bin-reports/test.ic exists). It happens on the first run and on every run that reuses the cache entry.
Repro: a single kotlin("jvm") module with one class and one test, org.gradle.configuration-cache=true in gradle.properties, ./gradlew clean koverXmlReport. Result: covered=0. The same run with --no-configuration-cache, or with 0.9.9, shows the correct coverage.
Observed in a multi-module project (LINE missed/covered):
Suggested fix: derive the outcome at execution time instead of from Task.state, for example with a marker file the test task writes in doFirst/doLast, or via Gradle's build event listeners (BuildEventsListenerRegistry / OperationCompletionListener).
Workaround: mark the koverGenerateArtifact* tasks with notCompatibleWithConfigurationCache(...).
Merged report across ~60 modules via dependencies { kover(project(...)) } on the root, with a custom variant limited to the jvm target
./gradlew jvmTest :koverVerifyCi -> all tests pass, but Rule 'Line coverage of the merged report' violated: lines covered percentage is 0.000000
Same command with --no-configuration-cache on 0.9.10 -> BUILD SUCCESSFUL, ~94.5% line coverage (same as 0.9.9)
That matches the configuration-time evaluation of the test task outcomes described here. Thanks for working on the fix; we're staying on 0.9.9 until it ships and can help test a fix if useful.
Same here with Android: AGP 9.4.1 (android.builtInKotlin=true, android.newDsl=true) app + library modules and two KMP modules (JVM target), Gradle 9.7.1, Kotlin 2.4.20, Kotest on the JUnit Platform, custom unit report variant merged in the root. Every .artifact lacks the .ic paths with the configuration cache on; pinned to 0.9.9 for now.
Activity
shanshin commentedon Sep 28, 2026
Thanks for the report!
PierreVieira commentedon Sep 29, 2026
We're hitting this too. Our project is a Kotlin Multiplatform app (Quartel-Enterprise/bible-planner-mobile-client), and bumping
0.9.9->0.9.10alone reproduces it.org.gradle.configuration-cache=truedependencies { kover(project(...)) }on the root, with a custom variant limited to thejvmtarget./gradlew jvmTest :koverVerifyCi-> all tests pass, butRule 'Line coverage of the merged report' violated: lines covered percentage is 0.000000--no-configuration-cacheon 0.9.10 ->BUILD SUCCESSFUL, ~94.5% line coverage (same as 0.9.9)That matches the configuration-time evaluation of the test task outcomes described here. Thanks for working on the fix; we're staying on 0.9.9 until it ships and can help test a fix if useful.
kvuvalentin commentedon Sep 29, 2026
Same here with Android: AGP 9.4.1 (android.builtInKotlin=true, android.newDsl=true) app + library modules and two KMP modules (JVM target), Gradle 9.7.1, Kotlin 2.4.20, Kotest on the JUnit Platform, custom unit report variant merged in the root. Every .artifact lacks the .ic paths with the configuration cache on; pinned to 0.9.9 for now.
shanshin commentedon Sep 29, 2026
The main problem is that Listeners is poorly compatible with the configuration cache.
And doFirst/doLast are badly compatible with the build cache.
So, fix #830 will be reverted for now.
shanshin commentedon Sep 29, 2026
Fix for #827 was reverted in
0.9.11Reverted the fix of Kotlin#827
chore(deps): update dependency org.jetbrains.kotlinx.kover to v0.9.11
chore(deps): update dependency org.jetbrains.kotlinx.kover to v0.9.11
chore(deps): update dependency org.jetbrains.kotlinx.kover to v0.9.11
chore(deps): update dependency org.jetbrains.kotlinx.kover to v0.9.11
Use Kover 0.9.11 and store gradlew.bat with LF
Use Kover 0.9.11 and store gradlew.bat with LF
build(deps): Bump the minor-and-patch group across 1 directory with 3…
build: fix Kover configuration cache coverage
build: fix Kover configuration cache coverage
build(deps): upgrade Gradle and fix Kover coverage (#139)
build(deps): upgrade Gradle and fix Kover coverage (#262)