File tree Expand file tree Collapse file tree 1 file changed +33
-2
lines changed
src/main/groovy/com/vanniktech/android/junit/jacoco Expand file tree Collapse file tree 1 file changed +33
-2
lines changed Original file line number Diff line number Diff line change @@ -10,11 +10,11 @@ class Generation implements Plugin<Project> {
10
10
project. subprojects { subProject ->
11
11
subProject. plugins. apply(' jacoco' )
12
12
13
- jacoco {
13
+ subProject . jacoco {
14
14
toolVersion ' 0.7.2.201409121644'
15
15
}
16
16
17
- subProject. task(" jacocoReport" , type : JacocoReport , dependsOn : ' testDebugUnitTest' ) {
17
+ subProject. task(' jacocoReport' , type : JacocoReport , dependsOn : ' testDebugUnitTest' ) {
18
18
group = ' Reporting'
19
19
description = ' Generate Jacoco coverage reports after running tests.'
20
20
@@ -49,5 +49,36 @@ class Generation implements Plugin<Project> {
49
49
}
50
50
}
51
51
}
52
+
53
+ project. plugins. apply(' jacoco' )
54
+
55
+ project. jacoco {
56
+ toolVersion ' 0.7.2.201409121644'
57
+ }
58
+
59
+ project. task(' jacocoFullReport' , type : JacocoReport , group : ' Coverage reports' ) {
60
+ group = ' Reporting'
61
+ description = ' Generate Jacoco coverage reports aggregated from all subprojects.'
62
+ dependsOn(project. subprojects. jacocoReport)
63
+
64
+ executionData = project. files(project. subprojects. jacocoReport. executionData)
65
+ classDirectories = project. files(project. subprojects. jacocoReport. classDirectories)
66
+ sourceDirectories = project. files(project. subprojects. jacocoReport. sourceDirectories)
67
+
68
+ reports {
69
+ xml {
70
+ enabled = true
71
+ destination " ${ project.buildDir} /reports/jacoco/full/jacoco.xml"
72
+ }
73
+ html {
74
+ enabled = true
75
+ destination " ${ project.buildDir} /reports/jacoco/full"
76
+ }
77
+ }
78
+
79
+ doFirst {
80
+ executionData = project. files(executionData. findAll { it. exists() })
81
+ }
82
+ }
52
83
}
53
84
}
You can’t perform that action at this time.
0 commit comments