Add check for coverage data before trying to produce report.
This commit is contained in:
parent
8c08eeb57b
commit
5caa41753a
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue