forked from Chesire/Nekome
-
Notifications
You must be signed in to change notification settings - Fork 0
/
jacoco.gradle
30 lines (25 loc) · 775 Bytes
/
jacoco.gradle
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
apply plugin: "jacoco"
jacoco {
toolVersion = "$jacoco_version"
}
tasks.withType(Test) {
jacoco.includeNoLocationClasses = true
}
task jacocoTestReport(
type: JacocoReport,
group: "verification"
) {
reports {
xml.enabled = true
html.enabled = true
}
def coverageExcludes = []
def debugTree = fileTree(dir: "$project.buildDir/tmp/kotlin-classes/debug", excludes: coverageExcludes)
def mainSrc = "$project.projectDir/src/main/java"
getSourceDirectories().setFrom(files([mainSrc]))
getClassDirectories().setFrom(files([debugTree]))
getExecutionData().setFrom(fileTree(dir: project.buildDir, includes: [
"jacoco/testDebugUnitTest.exec",
"outputs/code-coverage/connected/*coverage.ec"
]))
}