build: migrate unit test coverage from JaCoCo to Kover - #994
Merged
Conversation
Replaces the manual JaCoCo wiring in PublishingConventionPlugin with kotlinx-kover 0.9.9. The old jacocoTestReport task hardcoded AGP 9 internal intermediate paths (intermediates/built_in_kotlinc) to work around JaCoCo not understanding the built-in Kotlin compiler output; Kover integrates through AGP's variant APIs so none of that is needed. Also removes the unused com.mxalbert.gradle:jacoco-android classpath dependency (last released for AGP 8.x). CI now runs koverXmlReportDebug for the library modules. The instrumented-test coverage in instrumentation-test.yml is unchanged: it uses AGP's built-in on-device JaCoCo, which Kover does not cover.
kikoso
force-pushed
the
build/migrate-jacoco-to-kover
branch
from
September 10, 2026 13:07
aabb831 to
a990ea6
Compare
Contributor
Code Coverage
|
dkhawk
approved these changes
Sep 10, 2026
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Migrates unit test coverage from JaCoCo to kotlinx-kover 0.9.9.
Why: the
jacocoTestReporttask inPublishingConventionPluginhardcoded AGP 9 internal intermediate paths (intermediates/built_in_kotlinc/debug) to work around JaCoCo not understanding the built-in Kotlin compiler output. Those paths are implementation details that can break on any AGP update. Kover (first-party JetBrains, actively maintained against AGP 9) integrates through AGP's variant APIs, so the manual report wiring is deleted. The unusedcom.mxalbert.gradle:jacoco-androidclasspath dependency (last released for AGP 8.x) is removed as well.Changes
PublishingConventionPluginappliesorg.jetbrains.kotlinx.koverwithandroidGeneratedClasses()excluded, replacing the hand-rolledjacocoTestReporttask.test.ymlrunskoverXmlReportDebuginstead ofjacocoTestReport.instrumentation-test.yml(createDebugCoverageReportonmaps-app) uses AGP's built-in on-device JaCoCo, which Kover does not replace, so it stays as is.Verification
Full CI command
./gradlew build koverXmlReportDebug -x :maps-app:generateDebugScreenshotTestConfig -x :maps-app:generateReleaseScreenshotTestConfig --stacktracepasses locally (11m 51s). Kover reports generate for all three library modules;maps-compose-utils(the only module with host unit tests) shows captured coverage, and the modules without host tests report 0% exactly as JaCoCo did.