-
Notifications
You must be signed in to change notification settings - Fork 7
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
Coverage Report Fails with Gradle 6.5 #17
Comments
Thanks, your project does not compile due to missing |
It is. Kotlin allows to omit the common prefix of packages and even recommends it. |
OK, thanks for the clarification. Indeed I was using Java 8 (built in Android Studio). Regarding directories it seems that JaCoCo does not handle omitting them when embedding source code in reports. |
I haven't found anything in Gradle 6.5 changelog which may cause this issue. I've created issue on Gradle bugtracker as a possible regression: gradle/gradle#13614 |
Gradle seems to have fixed this in 6.6-rc-4. |
It's not really fixed, as Gradle engs said, Gradle now instruments the plugins so we should change how we use JaCoCo. |
From gradle/gradle#13614 (comment) it looks like Gradle added some workaround even in 6.6 RC1. |
@koral-- gradle/gradle#2429 contains some workarounds for enabling offline instrumentation. Especially https://github.com/AureaMohammadAlavi/gradle-jacoo-offline-instrumentation seems to be useful. I have not tried it, though. I also don’t know how easy it would be to enable offline instrumentation transparently, as you need to change the test classpath. |
I was going to tell you something similar, the official docs are https://www.jacoco.org/jacoco/trunk/doc/offline.html But that plugin seems to be the best starting point. In any case, I have no idea on how to implement it, I knew the concept but never played with it. |
I've just experienced the same issue. Downgrading to Gradle 6.3 worked, so I'll stick with that for now. Let me know if I can help with a fix. The basic error was 'classes do not match' as shown above. Environment:
|
This plugin fails with Gradle version 6.5. It worked with the last version of Gradle (6.4.1).
More precisely, the output of
jacocoTestReport
now contain lines like these:and jacoco reports 0% coverage on the plugin classes.
I have created a test repository that reproduces this bug and shows that it does not happen with Gradle 6.4.1: https://github.com/jGleitz/broken-testkit-coverage
The text was updated successfully, but these errors were encountered: