-
Notifications
You must be signed in to change notification settings - Fork 265
/
jacoco.gradle
38 lines (30 loc) · 1.03 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
//apply plugin: 'java-robolectric'
apply plugin: 'jacoco'
//robolectric {
// include '**/*Test.class'
// maxHeapSize = "2048m"
//}
jacoco {
toolVersion = "0.7.5.201505241946"
}
task testDebugUnitTestCoverage (type:JacocoReport, dependsOn: "testDebugUnitTest") {
group = "Reporting"
description = "Generate Jacoco coverage reports on the DEBUG build."
classDirectories = fileTree(
dir: "${project.buildDir}/intermediates/classes/debug",
excludes: ['**/R.class',
'**/R$*.class',
'**/*$ViewInjector*.*',
'**/*$ViewBinder*.*',
'**/BuildConfig.*',
'**/Manifest*.*']
)
def coverageSourceDirs = ["src/main/java", 'src/gen']
additionalSourceDirs = files(coverageSourceDirs)
sourceDirectories = files(coverageSourceDirs)
executionData = files("${project.buildDir}/jacoco/testDebugUnitTest.exec")
reports {
xml.enabled = true
html.enabled = true
}
}