A Gradle Plugin for Android developers that automatically configures Jacoco code coverage tasks for both combined and per module coverage reports, easier than ever.
SNAPSHOT pre-release with support for Android Gradle Plugin 8.3.0-alpha05.
executeAndroidTests=false
without defining a Gradle Managed DeviceNote: A SNAPSHOT 1.8.0 build that supports Android Gradle Plugin 8.3 is work-in-progress, and I expect to soon release the first SNAPSHOT.
enableUnitTestCoverage
and enableAndroidTestCoverage
as well as the now (in AGP 7.3) deprecated property testCoverageEnabled
.executeTests
configuration property has been deprecated. To follow the convention of the Android Gradle Plugin, it makes sense to only support the specific executeAndroidTests
and executeUnitTests
properties (just like AGP 7.3 now has enableUnitTestCoverage
and enableAndroidTestCoverage
).Google finally released a stable version of the Android Gradle Plugin 7.2 that fixes #36 , a bug introduced in Android Gradle Plugin 7.0 🥳.
None
BuildConfig
files may disappear or are not generated. This is caused by a bug in the Android Gradle Plugin version 7.2, a workaround has been released in 1.5.1../gradlew yourModule:coverageReport
.includeNoLocationClasses
which (like the name implies) sets Jacoco's includeNoLocationClasses
. This makes using the plugin in combination with Robolectric easier, since Robolectric often requires includeNoLocationClasses
to be set to true
.rootCoverageReport
(generated in the root project) has been renamed to coverageReport
, the old task still works but will generate a warning when used. To run all coverage tasks execute ./gradlew coverageReport
, to just run the combined (root) coverage report task use ./gradlew :coverageReport
(pay attention to the double colon :
). To run coverage for a specific module use ./gradlew :yourModule:coverageReport
.None
None