I’m using new JaCoCo plugin to create coverage report for our Android app that uses both Java and Kotlin. Previously we were using the .exec files generated by JaCoCo, and that included only Java classes coverage, but after the release of the plugin we switched to using exclusively XML format and it now reports both.
Everything seems to be working fine, I can see both Java and Kotlin files being reported, but what I noticed is that one particular Kotlin file displays 0% coverage.
Now, what makes it strange - is that in the HTML report generated by the JaCoCo this file shows a proper code coverage, but when imported to Sonar - the coverage disappears. And it’s reporting properly for other files in the same folder.
Here are some screenshots, file in question is BlackoutApi.kt
At first, I thought that it is caused by an extension function that was defined inside the class, but even after removing the issue persisted. We don’t have any other classes with the same name, so it’s not caused by that. The unit-test that covers this class is named BlackoutApiTest.kt
I suspect that something prevents mapping this class from the XML report to the indexed class in the Sonar. Is there a way to see any logs related to the jacoco plugin execution, to check it for errors?