Android: Jacoco code coverage is not generating after gradle upgrade to 7.0.x & jdk 11
Asked Answered
C

2

11

Android: Jacoco code coverage is not generating after gradle upgrade to 7.0.x & jdk 11 with testCoverageEnabled true. It is working perfect with gradle 4.2.x & jdk 8.

I tried removing testCoverageEnabled true with gradle 7.0.x & it again started working. It will work even if set it to false (testCoverageEnabled false). But the jacoco document says mark it as true only to generate test coverage report.

with gradle 4.2 and jdk 8 it worked fine & now with gradle 7.0 and jdk 11 it's working after removing the boolean.

can anyone help me to understand a more on this that how it is working if removed testCoverageEnabled true or it set to false?

Creight answered 5/1, 2022 at 8:33 Comment(2)
I have the same issue, I had it as true in the .gradle and jacoco didn't even create the merged reports folder. Turning this to false it generates a merged report only for junit test and not android test. So still missing a part of the coverage.Became
Really sorry I can't understand/answer why removing testCoverageEnabled works, but your question has actually solved our problem of the jacoco reports not generating. We've tried so many things, and this is the only thing that worked. So big thank you!Wireworm
V
0

In case anyone misses the comment by dev2505, removing testCoverageEnabled completely, appears to fix this.

Vicechancellor answered 30/1, 2023 at 16:2 Comment(0)
T
0

I am also experiencing the same issue. With gradle 7.x & jdk11 Jacoco coverage is not working for me.

Teague answered 2/8 at 10:55 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.