Update jacoco config to support kmp modules#3607
Conversation
Summary of ChangesHello, 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 updates the Jacoco configuration to correctly handle Kotlin Multiplatform modules, which were previously not included in code coverage reports. It introduces logic to detect module types (Android or KMP) and applies specific configurations accordingly. Additionally, it defines an exclusion list to prevent generated code from affecting coverage metrics. Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Changelog
Activity
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
|
There was a problem hiding this comment.
Code Review
This pull request updates the Jacoco configuration to support Kotlin Multiplatform (KMP) modules, which is a great improvement for ensuring code quality across the entire project. The changes in config/jacoco/jacoco.gradle to dynamically configure paths based on module type are well-implemented. I have a couple of suggestions to enhance the robustness and maintainability of the Gradle script.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #3607 +/- ##
============================================
- Coverage 69.47% 68.80% -0.68%
- Complexity 1812 1825 +13
============================================
Files 347 355 +8
Lines 9583 8577 -1006
Branches 1028 1076 +48
============================================
- Hits 6658 5901 -757
+ Misses 2296 2038 -258
- Partials 629 638 +9 🚀 New features to boost your workflow:
|
|
Are you able to verify that new paths are visible in codecov? |
|
@shobhitagarwal1612 good catch. The new reports were not being uploaded to Codecov. I updated the ci step to search and upload all jacoco reports of the project |
The current Jacoco config was not taking the new modules into account. This PR updates it to support Kotlin Multiplatform modules.
Note: KMP modules require a jvm() target for Jacoco to work, since it cannot process other non-JVM targets. After the migration is complete, we can consider switching to the official kotlinx-kover coverage plugin
@shobhitagarwal1612 PTAL?