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
Add filter for Jetpack Compose generated bytecode #1259
Conversation
@lsuski Tried your fork in my Compose project and it works great with instrumentation tests. Pushed an example project showing the problem in case you weren't aware of the issue: |
I'll check, in my projects I have some roboletric tests and coverage is quite fine (there are some uncovered lines even though they should be but the coberage is about 70%) |
Hey @lsuski ! Awesome work! |
@sarn0ld you have to build my fork on your own. I didn't publish it publicly. I use my company internal maven repo |
Any chance this will get merged soon? For me it is not clear whats blocking this PR? |
I think that the main problem is that JaCoCo is meant to be Jvm general coverage tool and should not have any specific frameworks filters and JetPack Compose is a niche from JaCoCo perspective. IMHO JaCoCo should have some extension mechanism which will allow registering such filters on demand and then there will be no need to add Compose filter here, it will be added by Android Gradle Plugin or any other third party Plugin |
This PR fixes #1208.
I'm aware that adding such thing to general purpose jvm coverage tool seems strange. Ideally there should be some extension mechanism in JaCoCo which allows adding
IFilter
in similar way asexcludes
are added. This could be utilized by android gradle plugin. However as there is no such feature and there is high need from android developers using Jetpack Compose (at least from those who use some coverage quality gates like my company) I decided to submit this PR.