mirror of
https://github.com/wulkanowy/wulkanowy.git
synced 2024-11-23 18:36:27 -06:00
57 lines
1.4 KiB
Groovy
57 lines
1.4 KiB
Groovy
apply plugin: "jacoco"
|
|
|
|
jacoco {
|
|
toolVersion "0.8.1"
|
|
reportsDir = file("$buildDir/reports")
|
|
}
|
|
|
|
tasks.withType(Test) {
|
|
jacoco.includeNoLocationClasses = true
|
|
}
|
|
|
|
// run ./gradlew clean createDebugCoverageReport jacocoTestReport
|
|
task jacocoTestReport(type: JacocoReport) {
|
|
|
|
group = "Reporting"
|
|
description = "Generate Jacoco coverage reports"
|
|
|
|
reports {
|
|
xml.enabled = true
|
|
html.enabled = true
|
|
}
|
|
|
|
def excludes = [
|
|
"**/R.class",
|
|
"**/R\$*.class",
|
|
"**/*\$ViewInjector*.*",
|
|
"**/BuildConfig.*",
|
|
"**/Manifest*.*",
|
|
"**/*Test*.*",
|
|
"android/**/*.*",
|
|
"**/*Fragment.*",
|
|
"**/*Activity.*"
|
|
]
|
|
|
|
// generated classes
|
|
classDirectories = fileTree(
|
|
// Java generated classes on Android project (debug build)
|
|
dir: "$buildDir/intermediates/classes/debug",
|
|
excludes: excludes
|
|
) + fileTree(
|
|
// Kotlin generated classes on Android project (debug build)
|
|
dir: "$buildDir/tmp/kotlin-classes/debug",
|
|
excludes: excludes
|
|
)
|
|
|
|
// sources
|
|
sourceDirectories = files([
|
|
android.sourceSets.main.java.srcDirs,
|
|
"src/main/kotlin"
|
|
])
|
|
|
|
executionData = fileTree(
|
|
dir: project.projectDir,
|
|
includes: ["**/*.exec" , "**/*.ec"]
|
|
)
|
|
}
|