wulkanowy-mod/app/jacoco.gradle

52 lines
1.3 KiB
Groovy
Raw Normal View History

apply plugin: "jacoco"
jacoco {
2021-04-03 04:56:07 -05:00
toolVersion "0.8.6"
reportsDirectory = file("$buildDir/reports")
}
tasks.withType(Test) {
jacoco.includeNoLocationClasses = true
jacoco.excludes = ['jdk.internal.*']
}
task jacocoTestReport(type: JacocoReport) {
group = "Reporting"
description = "Generate Jacoco coverage reports"
reports {
xml.enabled = true
html.enabled = true
}
2018-08-24 08:48:29 -05:00
def excludes = ['**/R.class',
'**/R$*.class',
'**/BuildConfig.*',
'**/Manifest*.*',
'**/*Test*.*',
'android/**/*.*',
'**/*Module.*',
'**/*Dagger*.*',
'**/*MembersInjector*.*',
'**/*_Provide*Factory*.*',
2018-08-25 17:18:31 -05:00
'**/*_Factory.*']
2019-04-29 13:39:35 -05:00
classDirectories.setFrom(fileTree(
dir: "$buildDir/intermediates/classes/debug",
excludes: excludes
) + fileTree(
2020-09-20 14:54:59 -05:00
dir: "$buildDir/tmp/kotlin-classes/fdroidDebug",
excludes: excludes
2019-04-29 13:39:35 -05:00
))
2019-06-03 07:12:48 -05:00
sourceDirectories.setFrom(files([
"src/main/java",
2020-09-20 14:54:59 -05:00
"src/fdroid/java"
2019-06-03 07:12:48 -05:00
]))
2019-04-29 13:39:35 -05:00
executionData.setFrom(fileTree(
dir: project.projectDir,
2018-08-24 08:48:29 -05:00
includes: ["**/*.exec", "**/*.ec"]
2019-04-29 13:39:35 -05:00
))
}