Skip to content

Commit f4e8762

Browse files
committed
demonstrate use of task dependencies for aggregate coverage
1 parent 96e41cc commit f4e8762

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

src/test/groovy/org/scoverage/AggregationAcceptanceTest.groovy

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ class AggregationAcceptanceTest extends AcceptanceTestUtils {
88
public void testMultiProjectAggregationWithZinc() throws Exception {
99
File projectDir = new File('src/test/water')
1010
def build = setupBuild(projectDir)
11-
build.forTasks('clean', 'reportScoverage', 'aggregateScoverage').run()
11+
build.forTasks('clean', 'aggregateScoverage').run()
1212
def indexHtml = new File(aggregateReportDir(projectDir), 'index.html')
1313
checkFile('an aggregated index HTML file', indexHtml, true)
1414
def cobertura = new File(aggregateReportDir(projectDir), 'cobertura.xml')

src/test/water/build.gradle

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@ buildscript {
1010
}
1111
}
1212

13-
task aggregateScoverage(type: org.scoverage.ScoverageAggregate)
14-
1513
allprojects {
1614
repositories {
1715
mavenCentral()
@@ -26,3 +24,10 @@ allprojects {
2624
testCompile 'junit:junit:4.11'
2725
}
2826
}
27+
28+
task aggregateScoverage(type: org.scoverage.ScoverageAggregate)
29+
30+
subprojects {
31+
aggregateScoverage.dependsOn(it.tasks)
32+
}
33+

0 commit comments

Comments
 (0)