-
Notifications
You must be signed in to change notification settings - Fork 72
v5 - Kover coverage #2451
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: v5
Are you sure you want to change the base?
v5 - Kover coverage #2451
Conversation
This allows to easily remove jacoco later
Summary of ChangesHello @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
Ignored Files
Using Gemini Code AssistThe 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
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 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
|
56fcb4b to
ec2fa78
Compare
There was a problem hiding this 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.
✅ No public API changes |
|
| // 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 { |
There was a problem hiding this comment.
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?



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.