use of org.gradle.testing.jacoco.plugins.JacocoTaskExtension in project gradle by gradle.
the class JacocoReportBase method executionData.
/**
* Adds execution data generated by a task to the list of those used during coverage analysis. Only tasks with a {@link JacocoTaskExtension} will be included; all others will be ignored.
*
* @param tasks one or more tasks to add
*/
public void executionData(Task... tasks) {
for (Task task : tasks) {
final JacocoTaskExtension extension = task.getExtensions().findByType(JacocoTaskExtension.class);
if (extension != null) {
executionData(new Callable<File>() {
@Override
public File call() {
return extension.getDestinationFile();
}
});
mustRunAfter(task);
}
}
}
use of org.gradle.testing.jacoco.plugins.JacocoTaskExtension in project gradle by gradle.
the class JacocoMerge method executionData.
/**
* Adds execution data generated by a task to the list of those to merge. Only tasks with a {@link JacocoTaskExtension} will be included; all others will be ignored.
*
* @param tasks one or more tasks to merge
*/
public void executionData(Task... tasks) {
for (Task task : tasks) {
JacocoTaskExtension extension = task.getExtensions().findByType(JacocoTaskExtension.class);
if (extension != null) {
ConfigurableFileCollection files = getProject().files(extension.getDestinationFile());
files.builtBy(task);
executionData(files);
}
}
}
Aggregations