Setting up an unified coverage report in Android with Jacoco, Robolectric, and Espresso
Rafael Toledo

On Android Gradle plug-in 2.2.0 and above the androidTest execution data is not saved to “” anymore but prefixed with device/AVD name such as “Some fancy”. The jacocoTestReport task has onlyIf rules to skip the task unless all execution data files are found.

Here’s how I changed this to capture the execution data with 2.2.0:

executionData = fileTree(dir: "$buildDir", includes: [ "jacoco/testDebugUnitTest.exec",