build: migrate unit test coverage from JaCoCo to Kover - #1777
Conversation
Code Coverage
|
dkhawk
left a comment
There was a problem hiding this comment.
Thanks for working on this, @kikoso! The migration from JaCoCo to kotlinx-kover is definitely the right direction, but there is a major branching issue on this PR:
1. Unintended inclusion of the experimental KMP feature branch (+5,967 lines)
build/migrate-jacoco-to-kover was branched from feat/experimental-kmp-clustering. Because PR #1777 targets main, it inadvertently pulls in all 5 unmerged KMP migration commits (85db3ab, e75f03e, 4526aab, 56aab16, deb93a2), bringing in the new maps-model module, multiplatform clustering/heatmaps/library conversions, and an AGP 9.4.0 bump.
In contrast, PR #1776 was a clean single-commit diff (+52 / -69) when targeted against feat/experimental-kmp-clustering.
2. Task and report paths on main
In this PR, test.yml and report.yml invoke koverXmlReportAndroid for library, clustering, and heatmaps. On main, those modules are standard Android library modules (not KMP), so their tasks are koverXmlReportDebug and output paths are reportDebug.xml. If Kover is intended for main, the CI workflow needs to use standard Android report tasks.
3. PR Description
The PR description was copied from android-maps-compose#994 and mentions maps-app, maps-compose-utils, and screenshot tests. The description on PR #1776 had the accurate breakdown for android-maps-utils.
Suggested Next Steps
- If Kover is intended for
main: Please branch cleanly offorigin/mainwith just the Kover convention plugin and CI updates configured for the standard Android modules (koverXmlReportDebug). - If Kover is intended for the KMP track: Please retarget this PR back to
feat/experimental-kmp-clustering(or reopen #1776).
Replaces the unmaintained com.mxalbert.gradle:jacoco-android plugin (last released for AGP 8.x) and the hand-rolled JaCoCo report wiring with kotlinx-kover 0.9.9, which supports AGP 9's built-in Kotlin compiler natively. - PublishingConventionPlugin now applies Kover instead of JaCoCo, dropping the classDirectories workaround that pointed at internal AGP intermediate paths. - data: removed the stale direct jacoco plugin and jacocoDebugReport task that still referenced the pre-AGP-9 tmp/kotlin-classes path. - CI now runs koverXmlReportDebug; report.yml points madrapps/jacoco-report (which supports Kover XML) at the new reportDebug.xml paths.
69b69df to
c578164
Compare
|
@dkhawk , this is fixed |
Summary
Migrates unit test coverage from JaCoCo to kotlinx-kover 0.9.9. The
com.mxalbert.gradle:jacoco-androidplugin is unmaintained (last released for AGP 8.x) and its class-directory auto-detection predates AGP's built-in Kotlin compiler, which forced a hand-rolled workaround pointing at internal AGP intermediate paths.Changes
PublishingConventionPluginapplies Kover instead of JaCoCo, dropping theclassDirectoriesworkaround. All modules using the convention plugin (library,clustering,data,heatmaps,ui,collections, etc.) get Kover automatically.data: removed the stale directjacocoplugin and thejacocoDebugReporttask that still referenced the pre-AGP-9tmp/kotlin-classespath.test.yml,report.yml) runskoverXmlReportDebug;report.ymlpointsmadrapps/jacoco-report(which supports Kover XML) at the newbuild/reports/kover/reportDebug.xmlpaths.jacoco-androidandorg.jacoco.corereplaced bykover-gradle-plugin.Testing
./gradlew :library:koverXmlReportDebug :ui:koverXmlReportDebug :data:koverXmlReportDebugconfigures and runs locally.