Skip to content

build: migrate unit test coverage from JaCoCo to Kover - #1777

Merged
dkhawk merged 1 commit into
mainfrom
build/migrate-jacoco-to-kover
Sep 10, 2026
Merged

dkhawk merged 1 commit into
mainfrom
build/migrate-jacoco-to-kover

Conversation

@kikoso

@kikoso kikoso commented Sep 10, 2026

Copy link
Copy Markdown
Collaborator

Summary

Migrates unit test coverage from JaCoCo to kotlinx-kover 0.9.9. The com.mxalbert.gradle:jacoco-android plugin 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

  • PublishingConventionPlugin applies Kover instead of JaCoCo, dropping the classDirectories workaround. All modules using the convention plugin (library, clustering, data, heatmaps, ui, collections, etc.) get Kover automatically.
  • data: removed the stale direct jacoco plugin and the jacocoDebugReport task that still referenced the pre-AGP-9 tmp/kotlin-classes path.
  • CI (test.yml, report.yml) runs koverXmlReportDebug; report.yml points madrapps/jacoco-report (which supports Kover XML) at the new build/reports/kover/reportDebug.xml paths.
  • Version catalog: jacoco-android and org.jacoco.core replaced by kover-gradle-plugin.

Testing

  • ./gradlew :library:koverXmlReportDebug :ui:koverXmlReportDebug :data:koverXmlReportDebug configures and runs locally.
  • CI coverage report on this PR exercises the new report paths.

@kikoso
kikoso requested a review from a team as a code owner September 10, 2026 12:53
@kikoso kikoso closed this Sep 10, 2026
@googlemaps-bot

googlemaps-bot commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

Code Coverage

Overall Project 50.32% 🍏

There is no coverage information present for the Files changed

@kikoso kikoso reopened this Sep 10, 2026

@dkhawk dkhawk left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 off origin/main with 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.
@kikoso
kikoso force-pushed the build/migrate-jacoco-to-kover branch from 69b69df to c578164 Compare September 10, 2026 18:16
@kikoso

kikoso commented Sep 10, 2026

Copy link
Copy Markdown
Collaborator Author

@dkhawk , this is fixed

@dkhawk
dkhawk merged commit e8ef093 into main Sep 10, 2026
12 checks passed
@dkhawk
dkhawk deleted the build/migrate-jacoco-to-kover branch September 10, 2026 19:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants