use of org.gradle.internal.jacoco.JacocoCheckResult in project gradle by gradle.
the class JacocoCoverageVerification method check.
@TaskAction
public void check() {
final Spec<File> fileExistsSpec = new Spec<File>() {
@Override
public boolean isSatisfiedBy(File file) {
return file.exists();
}
};
JacocoCheckResult checkResult = new AntJacocoCheck(getAntBuilder()).execute(getJacocoClasspath(), getProject().getName(), getAllClassDirs().filter(fileExistsSpec), getAllSourceDirs().filter(fileExistsSpec), getExecutionData(), getViolationRules());
if (!checkResult.isSuccess()) {
throw new GradleException(checkResult.getFailureMessage());
}
}
Aggregations