Closed Siedlerchr closed 4 months ago
When I remove "useJacoco" it works
Hi, sometimes it happens that Android projects have different classes with the same fully-qualified name in different build variants. And it is impossible to understand exactly which build variant this class was compiled from. This is a technical limitation of on-the-fly instrumentation, when loading a class into the JVM, only its fully-qualified name is known.
In this case, the coverage result for these classes turns out to be unpredictable and does not always match the lines. In case of such a problem, the JaCoCo report generator throws an error, and the Kover generator shows a very approximate coverage for such classes (which is not always correct).
Related #78
You may try to exclude such classes from the report
kover {
reports {
filters {
excludes {
classes("com.example.DuplicatedClass")
}
}
}
}
Thanks for the response, I will try this out
I tried several excludes .e.g the full classname, only the classname or with wildarcd and it still does not work. Just tried with 0.8.1 still not working
@Siedlerchr, сould you provide a reproducer project? It would help with the setup. You may have filters configured in another project that does not generate the report.
I have the same problem updating to0.8.1
I could also reproduce using the minimal_kts
example just adding useJacoco()
to the kover
block.
kover {
useJacoco()
reports {
// filters for all report types of all build variants
filters {
...
Fixed in 0.8.2
Describe the bug Execute kover html report in kmp project with jvm + android
kover settings:
Errors
Expected behavior It should work
Reproducer A link to your project, if it is open source. Otherwise, please try to reproduce the problem on a small project. If this is not feasible, give an example of the code on which the problem manifests itself.
Reports If applicable, report files or screenshots.
Environment