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