Gradle jacoco coverage report with more than one submodule(s)?
Finally I found this plugin: https://github.com/palantir/gradle-jacoco-coverage that did the job for me:
root gradle.build
buildscript {
repositories {
jcenter()
}
dependencies {
// see https://jcenter.bintray.com/com/android/tools/build/gradle/
classpath 'com.android.tools.build:gradle:2.1.0'
// classpath 'com.android.tools.build:gradle:2.2.0-alpha1'
// https://github.com/palantir/gradle-jacoco-coverage
classpath 'com.palantir:jacoco-coverage:0.4.0'
}
}
// https://github.com/palantir/gradle-jacoco-coverage
apply plugin: 'com.palantir.jacoco-full-report'
all subprojects that has
apply plugin: 'jacoco'
are included in the report.
This works for me
plugins {
id 'org.kordamp.gradle.jacoco' version '0.43.0'
}
config {
coverage {
jacoco {
enabled
aggregateExecFile
aggregateReportHtmlFile
aggregateReportXmlFile
additionalSourceDirs
additionalClassDirs
}
}
}
https://kordamp.org/kordamp-gradle-plugins/#_org_kordamp_gradle_jacoco