2018-07-14 07:06:57 -05:00
|
|
|
apply plugin: "jacoco"
|
|
|
|
|
|
|
|
jacoco {
|
2018-08-25 17:18:31 -05:00
|
|
|
toolVersion "0.8.2"
|
2018-07-14 07:06:57 -05:00
|
|
|
reportsDir = file("$buildDir/reports")
|
|
|
|
}
|
|
|
|
|
|
|
|
tasks.withType(Test) {
|
|
|
|
jacoco.includeNoLocationClasses = true
|
|
|
|
}
|
|
|
|
|
|
|
|
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.*']
|
2018-07-14 07:06:57 -05:00
|
|
|
|
|
|
|
classDirectories = fileTree(
|
|
|
|
dir: "$buildDir/intermediates/classes/debug",
|
|
|
|
excludes: excludes
|
|
|
|
) + fileTree(
|
|
|
|
dir: "$buildDir/tmp/kotlin-classes/debug",
|
|
|
|
excludes: excludes
|
|
|
|
)
|
|
|
|
|
2018-08-24 08:48:29 -05:00
|
|
|
sourceDirectories = files("$project.projectDir/src/main/java")
|
2018-07-14 07:06:57 -05:00
|
|
|
executionData = fileTree(
|
|
|
|
dir: project.projectDir,
|
2018-08-24 08:48:29 -05:00
|
|
|
includes: ["**/*.exec", "**/*.ec"]
|
2018-07-14 07:06:57 -05:00
|
|
|
)
|
|
|
|
}
|