1
0
mirror of https://github.com/wulkanowy/wulkanowy.git synced 2025-01-19 03:06:50 -06:00
wulkanowy-mirror/app/jacoco.gradle

52 lines
1.3 KiB
Groovy
Raw Normal View History

apply plugin: "jacoco"
jacoco {
toolVersion "0.8.11"
2021-08-25 20:49:44 +02:00
reportsDirectory.set(file("$buildDir/reports"))
}
2023-10-06 10:07:55 +02:00
tasks.withType(Test).configureEach {
jacoco.includeNoLocationClasses = true
jacoco.excludes = ['jdk.internal.*']
}
2023-10-06 10:07:55 +02:00
tasks.register('jacocoTestReport', JacocoReport) {
group = "Reporting"
description = "Generate Jacoco coverage reports"
reports {
2021-08-25 20:49:44 +02:00
xml.required.set(true)
html.required.set(true)
}
2018-08-24 15:48:29 +02:00
def excludes = ['**/R.class',
'**/R$*.class',
'**/BuildConfig.*',
'**/Manifest*.*',
'**/*Test*.*',
'android/**/*.*',
'**/*Module.*',
'**/*Dagger*.*',
'**/*MembersInjector*.*',
'**/*_Provide*Factory*.*',
2018-08-26 00:18:31 +02:00
'**/*_Factory.*']
2019-04-29 20:39:35 +02:00
classDirectories.setFrom(fileTree(
2023-10-06 10:07:55 +02:00
dir: "$buildDir/intermediates/classes/debug",
excludes: excludes
) + fileTree(
2023-10-06 10:07:55 +02:00
dir: "$buildDir/tmp/kotlin-classes/fdroidDebug",
excludes: excludes
2019-04-29 20:39:35 +02:00
))
2019-06-03 14:12:48 +02:00
sourceDirectories.setFrom(files([
2023-10-06 10:07:55 +02:00
"src/main/java",
"src/fdroid/java"
2019-06-03 14:12:48 +02:00
]))
2019-04-29 20:39:35 +02:00
executionData.setFrom(fileTree(
2023-10-06 10:07:55 +02:00
dir: project.projectDir,
includes: ["**/*.exec", "**/*.ec"]
2019-04-29 20:39:35 +02:00
))
}