Skip to content

Commit 5caa417

Browse files
committed
Add check for coverage data before trying to produce report.
1 parent 8c08eeb commit 5caa417

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

gradle/emma.gradle

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,11 @@ if (rootProject.getTasksByName('coverageReport', false).isEmpty()) {
5454
}
5555
}
5656
}
57+
58+
if (!rootProject.buildDir.exists()) {
59+
throw new GradleException("No coverage data. Run gradle with -Pcoverage=on if using coverageRepor");
60+
}
61+
5762
ant.emma(enabled: "true", verbosity: "info") {
5863
report(sourcepathref:"src.path") {
5964
fileset(dir: rootProject.buildDir) {

0 commit comments

Comments
 (0)