Add check for coverage data before trying to produce report.

This commit is contained in:
Luke Taylor 2011-02-01 15:41:17 +00:00
parent 8c08eeb57b
commit 5caa41753a
1 changed files with 5 additions and 0 deletions

View File

@ -54,6 +54,11 @@ if (rootProject.getTasksByName('coverageReport', false).isEmpty()) {
}
}
}
if (!rootProject.buildDir.exists()) {
throw new GradleException("No coverage data. Run gradle with -Pcoverage=on if using coverageRepor");
}
ant.emma(enabled: "true", verbosity: "info") {
report(sourcepathref:"src.path") {
fileset(dir: rootProject.buildDir) {