public Object getValue(Convention convention, IConventionAware conventionAwareObject) {
return convention.getPlugin(ProjectReportsPluginConvention.class).getProjects();
}
});
DependencyReportTask dependencyReportTask = project.getTasks().add(DEPENDENCY_REPORT,
DependencyReportTask.class);
dependencyReportTask.setDescription("Generates a report about your library dependencies.");
dependencyReportTask.conventionMapping("outputFile", new ConventionValue() {
public Object getValue(Convention convention, IConventionAware conventionAwareObject) {
return new File(convention.getPlugin(ProjectReportsPluginConvention.class).getProjectReportDir(), "dependencies.txt");
}
});
dependencyReportTask.conventionMapping("projects", new ConventionValue() {
public Object getValue(Convention convention, IConventionAware conventionAwareObject) {
return convention.getPlugin(ProjectReportsPluginConvention.class).getProjects();
}
});