-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathjacoco.gradle
59 lines (59 loc) · 1.77 KB
/
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
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
//apply plugin: 'jacoco'
//
//ext {
// coverageExclusions = [
// '**/*Activity*.*',
// '**/*Fragment*.*',
// '**/*Base*.*',
// '**/*Layout*.*',
// '**/*View*.*',
// '**/*Anim*.*',
// '**/*Receiver*.*',
// '**/*Notification*.*',
// '**/R.class',
// '**/R$*.class',
// '**/BuildConfig.*',
// '**/view/**',
// '**/webView/**',
// '**/model/**',
// '**/PNUtil.kt'
// ]
//// '**/*Dialog*.*',
//// '**/*Adapter*.*',
//}
//
//jacoco {
// toolVersion = "$jacocoVersion"
//}
//
//tasks.withType(Test).configureEach {
// jacoco {
// includeNoLocationClasses = true
// excludes = ['jdk.internal.*'] // Allows it to run on Java 11
// }
//}
//
//tasks.withType(Test) {
// finalizedBy jacocoTestReport // report is always generated after tests run
//}
//
//task jacocoTestReport(type: JacocoReport, dependsOn: ['testDebugUnitTest', 'createDebugCoverageReport']) {
// group = "Reporting"
// description = "Generate Jacoco coverage reports"
//
// reports {
// xml.required = true
// html.required = true
// html.outputLocation = layout.buildDirectory.dir('jacocoHtml')
// }
//
// def debugTree = fileTree(dir: "${buildDir}/intermediates/javac/debug/classes", excludes: coverageExclusions)
// def kotlinDebugTree = fileTree(dir: "${buildDir}/tmp/kotlin-classes/debug", excludes: coverageExclusions)
// def mainSrc = "/src/main/java"
//
// sourceDirectories.setFrom(files([mainSrc]))
// classDirectories.setFrom(files([debugTree], [kotlinDebugTree]))
// executionData.setFrom(fileTree(dir: project.buildDir, includes: [
// "**/**/*.exec", "**/**/*.ec"
// ]))
//}