Skip to content

Conversation

@OscarSpruit
Copy link
Contributor

Description

Replace Jacoco with Kover for coverage reports. Kover is Kotlin first, it's better in understanding Kotlin code coverage and it allows to exclude annotations (useful for composables for example).

Motivation

With v6 using compose it will seem like our coverage will drop significantly. Using Kover for v6 allows us to have a more realistic report. To have a better comparison between v5 and v6, it makes sense to use Kover on v5 as well.

@OscarSpruit OscarSpruit requested a review from a team as a code owner December 4, 2025 15:46
@OscarSpruit OscarSpruit added the Chore [PRs only] Indicates any task that does not need to be mentioned in the public release notes label Dec 4, 2025
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @OscarSpruit, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request implements a significant upgrade to our code coverage infrastructure by migrating from Jacoco to Kover. This change is motivated by Kover's native support for Kotlin and its advanced filtering capabilities, particularly its ability to exclude annotations, which will provide more accurate and relevant coverage metrics for our codebase, especially as we transition to Jetpack Compose in future versions.

Highlights

  • Coverage Tool Migration: Replaced Jacoco with Kover for code coverage reporting across the project.
  • Kotlin-First Coverage: Kover offers better understanding and accuracy for Kotlin code coverage, aligning with the project's primary language.
  • Composable Exclusion: Kover enables excluding specific annotations like @composable from coverage reports, which is crucial for Jetpack Compose projects.
  • Preparation for v6: This change aligns v5's coverage reporting with the upcoming v6, which will heavily utilize Compose, providing a more realistic and comparable coverage baseline.
Ignored Files
  • Ignored by pattern: .github/workflows/** (1)
    • .github/workflows/sonar_cloud.yml
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@OscarSpruit OscarSpruit force-pushed the chore/kover-coverage-v5 branch from 56fcb4b to ec2fa78 Compare December 4, 2025 15:48
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request successfully replaces Jacoco with Kover for code coverage reporting, which is a great move for a Kotlin-based project to get more accurate metrics, especially with Jetpack Compose. The configuration is mostly correct, but I've identified a critical issue with missing coverage exclusions for generated code (like Hilt/Dagger) which would significantly skew the reports. I've also pointed out a redundant configuration block that should be removed. Addressing these points will ensure the Kover integration is robust and provides accurate coverage data.

@araratthehero araratthehero self-assigned this Dec 8, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Dec 8, 2025

✅ No public API changes

@sonarqubecloud
Copy link

sonarqubecloud bot commented Dec 8, 2025

// the `plugins` block cannot be used in gradle files such as this one, which are imported into other gradle files with the `apply from` command
apply plugin: 'org.jetbrains.kotlinx.kover'

kover {
Copy link
Contributor

Choose a reason for hiding this comment

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

I see some exclusions are not included in this file.

  • All generated dependency injection code (e.g., _Factory, Dagger, *_HiltComponents).
  • R classes, Manifest files, and specific ViewBinding/BindingAdapter classes (I see only databinding.* being excluded).
  • Adapters, Dialogs, Drawables (only Activities and Fragments are currently excluded).
  • Specific files including ComposeExtensions, DropInExt, FileDownloader, BuildUtils, and ActivityResult contracts.

Is this intended?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Chore [PRs only] Indicates any task that does not need to be mentioned in the public release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants