Assigned
Status Update
Comments
ku...@google.com <ku...@google.com>
[Deleted User] <[Deleted User]> #3
Same problems!
to...@sap.com <to...@sap.com> #4
Looks there are two ways to solve this issue:
1, Upgrade gradle to 7.3 and android-gradle-plugin to 7.2.0-alpha06. We can get the jacoco data and report.
2, set testCoverageEnabled to false with gradle 7.0.2 & android-gradle-plugin 7.0.2
1, Upgrade gradle to 7.3 and android-gradle-plugin to 7.2.0-alpha06. We can get the jacoco data and report.
2, set testCoverageEnabled to false with gradle 7.0.2 & android-gradle-plugin 7.0.2
Description
If I set testCoverageEnabled to true in the build.gradle for a library module in a multi-module Android project, then the .exec file generated for running unit tests is nearly empty, and any reports generated from it will show 0% code coverage.
Setting testCoverageEnabled to false results in a much larger .exec file that displays the proper coverage in generated reports. (however, testCoverageEnabled is required so that I can use these binaries to gather coverage numbers for on-device instrumentation tests)
Sample:
Environment:
Steps:
../gradlew clean testDebugUnitTest
../gradlew clean testDebugUnitTest
testCoverageEnabled
tofalse
.