mirror of
https://github.com/wulkanowy/wulkanowy.git
synced 2024-11-10 00:30:47 -06:00
52 lines
1.3 KiB
Groovy
52 lines
1.3 KiB
Groovy
apply plugin: "jacoco"
|
|
|
|
jacoco {
|
|
toolVersion "0.8.11"
|
|
reportsDirectory.set(file("$buildDir/reports"))
|
|
}
|
|
|
|
tasks.withType(Test).configureEach {
|
|
jacoco.includeNoLocationClasses = true
|
|
jacoco.excludes = ['jdk.internal.*']
|
|
}
|
|
|
|
tasks.register('jacocoTestReport', JacocoReport) {
|
|
|
|
group = "Reporting"
|
|
description = "Generate Jacoco coverage reports"
|
|
|
|
reports {
|
|
xml.required.set(true)
|
|
html.required.set(true)
|
|
}
|
|
|
|
def excludes = ['**/R.class',
|
|
'**/R$*.class',
|
|
'**/BuildConfig.*',
|
|
'**/Manifest*.*',
|
|
'**/*Test*.*',
|
|
'android/**/*.*',
|
|
'**/*Module.*',
|
|
'**/*Dagger*.*',
|
|
'**/*MembersInjector*.*',
|
|
'**/*_Provide*Factory*.*',
|
|
'**/*_Factory.*']
|
|
|
|
classDirectories.setFrom(fileTree(
|
|
dir: "$buildDir/intermediates/classes/debug",
|
|
excludes: excludes
|
|
) + fileTree(
|
|
dir: "$buildDir/tmp/kotlin-classes/fdroidDebug",
|
|
excludes: excludes
|
|
))
|
|
|
|
sourceDirectories.setFrom(files([
|
|
"src/main/java",
|
|
"src/fdroid/java"
|
|
]))
|
|
executionData.setFrom(fileTree(
|
|
dir: project.projectDir,
|
|
includes: ["**/*.exec", "**/*.ec"]
|
|
))
|
|
}
|