-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjacoco.gradle
28 lines (22 loc) · 956 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
apply plugin: "jacoco"
jacoco {
toolVersion = "0.8.5"
}
task jacocoUnitTestReport(type: JacocoReport, dependsOn: ['testQaDebugUnitTest']) {
def coverageSourceDirs = ["src/main/java/com/sec/loginsample/data"]
def fileFilter = [
'**/R.class',
'**/R$*.class',
'**/BuildConfig.*',
'**/Manifest*.*',
]
def javaClasses = fileTree(dir: "${project.buildDir}/intermediates/javac/qa1Debug/classes/com/sec/loginsample/data", excludes: fileFilter)
def kotlinClasses = fileTree(dir: "${project.buildDir}/tmp/kotlin-classes/qa1Debug/com/sec/loginsample/data", excludes: fileFilter)
getClassDirectories().from(files([javaClasses, kotlinClasses]))
getSourceDirectories().from(files(coverageSourceDirs))
getExecutionData().from(fileTree(dir: "${buildDir}", includes: ["jacoco/testQa1DebugUnitTest.exec"]))
reports {
xml.enabled = true
html.enabled = true
}
}