Skip to content

Instantly share code, notes, and snippets.

@felixklauke
Created September 21, 2018 06:58
Show Gist options
  • Save felixklauke/bc663813698f6c75ada866d7a2295c1b to your computer and use it in GitHub Desktop.
Save felixklauke/bc663813698f6c75ada866d7a2295c1b to your computer and use it in GitHub Desktop.
task codeCoverageReport(type: JacocoReport) {
executionData fileTree(project.rootDir.absolutePath).include("**/build/jacoco/*.exec")
// Add all relevant sourcesets from the subprojects
subprojects.each {
sourceSets it.sourceSets.main
}
reports {
xml.enabled = true
xml.setDestination(new File("${buildDir}/reports/jacoco/report.xml"))
html.setEnabled(true)
html.setDestination(new File("${buildDir}/reports/jacoco/report.html"))
}
dependencies {
subprojects {
test
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment