-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjacoco.gradle
More file actions
30 lines (25 loc) · 820 Bytes
/
jacoco.gradle
File metadata and controls
30 lines (25 loc) · 820 Bytes
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 = "0.8.6"
}
task jacocoTestReport(type: JacocoReport, dependsOn: 'testDebugUnitTest') {
def coverageSourceDirs = ['src/main/java']
additionalClassDirs.from = files(coverageSourceDirs)
sourceDirectories.from = files(coverageSourceDirs)
classDirectories.from = fileTree(
dir: "$buildDir/tmp/kotlin-classes/debug",
excludes: [
'**/R.class',
'**/R$*.class',
'**/BuildConfig.*',
'**/Manifest*.*',
'com/android/**/*.class',
'**/*Activity*.*'
]
)
executionData.from = files("$buildDir/jacoco/testDebugUnitTest.exec")
reports {
xml.enabled = true
html.enabled = true
}
}