I’ve been using the jacoco plugin to generate coverage reports for an Android project, and couldn’t get reporting for certain classes, even though they were being tested and executed.
At first I thought it was something to do with a class ID missmatch (http://www.eclemma.org/jacoco/trunk/doc/classids.html).
Then I discovered that this only happens when the class name starts with the letter “R”. If I rename any of the affected classes to start with any character other than “R”, I get normal coverage reporting. I have a feeling this is something to do with the jacoco plugin trying to avoid coverage reports on the Android R.class, which usually gets used extensively.
I have created a minimal test case and uploaded it to github (https://github.com/MikeKlemarewski/GradleCoverageTest). Am I crazy in what I’m doing here? Are there any workarounds or configuration I’m not considering?