Small hint for everyone who try to use JaCoCo coverage in android builds... unexpected finding!!!

Problem was: during Jacoco report generation produced only HTML version of report and skipped for no good reason XML report generation

Solution: in own build scripts apply jacoco plugin first and then apply android build system plugin.

[code]
if (useJacoco) {
    /* http://raptordigital.blogspot.se/2014/08/code-coverage-reports-using-robolectric.html */
    apply plugin: 'jacoco'
}
apply plugin: 'com.android.application'
[/code]

Remember: do not apply Jacoc plugin after the android plugin, otherwise will be unexpected JaCoCo report task behavior.

related to: https://plus.google.com/117981280628062796190/posts/6vNWkkLed3b

Tags: #android   #jacoco   #gradle   #xml   #androidstudio
Photo
Shared publiclyView activity