wulkanowy-mod/jacoco.gradle

41 lines
1.1 KiB
Groovy
Raw Normal View History

2017-11-26 09:32:33 -06:00
apply plugin: "jacoco"
jacoco {
2018-04-03 09:10:56 -05:00
toolVersion "0.8.1"
}
tasks.withType(Test) {
jacoco.includeNoLocationClasses = true
2017-11-26 09:32:33 -06:00
}
// run ./gradlew clean createDebugCoverageReport jacocoTestReport
task jacocoTestReport(type: JacocoReport) {
group = "Reporting"
description = "Generate Jacoco coverage reports"
reports {
xml.enabled = true
html.enabled = true
}
def fileFilter = ["**/R.class",
"**/R\$*.class",
"**/BuildConfig.*",
"**/Manifest*.*",
"android/**/*.*",
"**/Lambda.class",
"**/*Lambda.class",
"**/*Lambda*.class",
"**/*Lambda*.*",
"**/*Builder.*"
]
def debugTree = fileTree(dir: "${buildDir}/intermediates/classes/debug", excludes: fileFilter)
def mainSrc = "${project.projectDir}/src/main/java"
sourceDirectories = files([mainSrc])
classDirectories = files([debugTree])
executionData = fileTree(dir: project.projectDir, includes: ["**/*.exec" , "**/*.ec"])
}