forked from aws-amplify/amplify-android
-
Notifications
You must be signed in to change notification settings - Fork 0
/
kover.gradle
62 lines (53 loc) · 1.67 KB
/
kover.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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
apply plugin: 'kover'
project.ext {
// Exclude file by names, packages or types. Such files will be ignored during test coverage
// calculation
ignoreFileFilter = [
'**/*App.*',
'**/*Application.*',
'**/*Activity.*',
'**/*Fragment.*',
'**/*View.*',
'**/*ViewGroup.*',
'**/*JsonAdapter.*',
'**/di/**',
'**/*Dagger.*'
]
}
kover{
instrumentation {
// exclude jdk internals from instrumentation
excludeTasks.add "jdk.internal.*"
}
xmlReport {
// set to true to run koverXmlReport task during the execution of the check task (if it exists) of the current project
onCheck.set false
// change report file name
reportFile.set layout.buildDirectory.file("reports/kover/xml/${project.name}.xml")
overrideFilters {
// override common class filter
classes {
// override class exclusion rules
excludes.addAll ignoreFileFilter
}
}
}
htmlReport {
// set to true to run koverMergedHtmlReport task during the execution of the check task (if it exists) of the current project
onCheck.set false
// change report directory
reportDir.set layout.buildDirectory.dir("reports/kover/html/${project.name}/")
overrideFilters {
// override common class filter
classes {
// override class exclusion rules
excludes.addAll ignoreFileFilter
}
}
}
}
tasks.withType(Test) {
kover {
isDisabled = project.name.contains("test")
}
}