org.gradle.api.Rule Java Examples
The following examples show how to use
org.gradle.api.Rule.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: TaskReportRenderer.java From pushfish-android with BSD 2-Clause "Simplified" License | 5 votes |
/** * Writes a rule for the current project. * * @param rule The rule */ public void addRule(Rule rule) { if (!currentProjectHasRules) { addSubheading("Rules"); } getTextOutput().println(GUtil.elvis(rule.getDescription(), "")); currentProjectHasRules = true; }
Example #2
Source File: TaskReportTask.java From pushfish-android with BSD 2-Clause "Simplified" License | 5 votes |
public void generate(Project project) throws IOException { renderer.showDetail(isDetail()); renderer.addDefaultTasks(project.getDefaultTasks()); AggregateMultiProjectTaskReportModel aggregateModel = new AggregateMultiProjectTaskReportModel(!isDetail()); TaskDetailsFactory taskDetailsFactory = new TaskDetailsFactory(project); SingleProjectTaskReportModel projectTaskModel = new SingleProjectTaskReportModel(taskDetailsFactory); projectTaskModel.build(getProjectTaskLister().listProjectTasks(project)); aggregateModel.add(projectTaskModel); for (Project subproject : project.getSubprojects()) { SingleProjectTaskReportModel subprojectTaskModel = new SingleProjectTaskReportModel(taskDetailsFactory); subprojectTaskModel.build(getProjectTaskLister().listProjectTasks(subproject)); aggregateModel.add(subprojectTaskModel); } aggregateModel.build(); DefaultGroupTaskReportModel model = new DefaultGroupTaskReportModel(); model.build(aggregateModel); for (String group : model.getGroups()) { renderer.startTaskGroup(group); for (TaskDetails task : model.getTasksForGroup(group)) { renderer.addTask(task); for (TaskDetails child : task.getChildren()) { renderer.addChildTask(child); } } } renderer.completeTasks(); for (Rule rule : project.getTasks().getRules()) { renderer.addRule(rule); } }
Example #3
Source File: TaskReportRenderer.java From pushfish-android with BSD 2-Clause "Simplified" License | 5 votes |
/** * Writes a rule for the current project. * * @param rule The rule */ public void addRule(Rule rule) { if (!currentProjectHasRules) { addSubheading("Rules"); } getTextOutput().println(GUtil.elvis(rule.getDescription(), "")); currentProjectHasRules = true; }
Example #4
Source File: TaskReportRenderer.java From Pushjet-Android with BSD 2-Clause "Simplified" License | 5 votes |
/** * Writes a rule for the current project. * * @param rule The rule */ public void addRule(Rule rule) { if (!currentProjectHasRules) { addSubheading("Rules"); } getTextOutput().println(GUtil.elvis(rule.getDescription(), "")); currentProjectHasRules = true; }
Example #5
Source File: TaskReportTask.java From Pushjet-Android with BSD 2-Clause "Simplified" License | 5 votes |
public void generate(Project project) throws IOException { renderer.showDetail(isDetail()); renderer.addDefaultTasks(project.getDefaultTasks()); AggregateMultiProjectTaskReportModel aggregateModel = new AggregateMultiProjectTaskReportModel(!isDetail()); TaskDetailsFactory taskDetailsFactory = new TaskDetailsFactory(project); SingleProjectTaskReportModel projectTaskModel = new SingleProjectTaskReportModel(taskDetailsFactory); projectTaskModel.build(getProjectTaskLister().listProjectTasks(project)); aggregateModel.add(projectTaskModel); for (Project subproject : project.getSubprojects()) { SingleProjectTaskReportModel subprojectTaskModel = new SingleProjectTaskReportModel(taskDetailsFactory); subprojectTaskModel.build(getProjectTaskLister().listProjectTasks(subproject)); aggregateModel.add(subprojectTaskModel); } aggregateModel.build(); DefaultGroupTaskReportModel model = new DefaultGroupTaskReportModel(); model.build(aggregateModel); for (String group : model.getGroups()) { renderer.startTaskGroup(group); for (TaskDetails task : model.getTasksForGroup(group)) { renderer.addTask(task); for (TaskDetails child : task.getChildren()) { renderer.addChildTask(child); } } } renderer.completeTasks(); for (Rule rule : project.getTasks().getRules()) { renderer.addRule(rule); } }
Example #6
Source File: TaskReportRenderer.java From Pushjet-Android with BSD 2-Clause "Simplified" License | 5 votes |
/** * Writes a rule for the current project. * * @param rule The rule */ public void addRule(Rule rule) { if (!currentProjectHasRules) { addSubheading("Rules"); } getTextOutput().println(GUtil.elvis(rule.getDescription(), "")); currentProjectHasRules = true; }
Example #7
Source File: TaskReportTask.java From pushfish-android with BSD 2-Clause "Simplified" License | 4 votes |
public void generate(Project project) throws IOException { renderer.showDetail(isDetail()); renderer.addDefaultTasks(project.getDefaultTasks()); AggregateMultiProjectTaskReportModel aggregateModel = new AggregateMultiProjectTaskReportModel(!isDetail()); TaskDetailsFactory taskDetailsFactory = new TaskDetailsFactory(project); SingleProjectTaskReportModel projectTaskModel = new SingleProjectTaskReportModel(taskDetailsFactory); ProjectInternal projectInternal = (ProjectInternal) project; TaskContainerInternal tasks = projectInternal.getTasks(); tasks.actualize(); projectTaskModel.build(Sets.union(tasks, projectInternal.getImplicitTasks())); aggregateModel.add(projectTaskModel); for (Project subproject : project.getSubprojects()) { SingleProjectTaskReportModel subprojectTaskModel = new SingleProjectTaskReportModel(taskDetailsFactory); ProjectInternal subprojectInternal = (ProjectInternal) subproject; TaskContainerInternal subprojectTasks = subprojectInternal.getTasks(); subprojectTasks.actualize(); subprojectTaskModel.build(subprojectTasks); aggregateModel.add(subprojectTaskModel); } aggregateModel.build(); DefaultGroupTaskReportModel model = new DefaultGroupTaskReportModel(); model.build(aggregateModel); for (String group : model.getGroups()) { renderer.startTaskGroup(group); for (TaskDetails task : model.getTasksForGroup(group)) { renderer.addTask(task); for (TaskDetails child : task.getChildren()) { renderer.addChildTask(child); } } } renderer.completeTasks(); for (Rule rule : project.getTasks().getRules()) { renderer.addRule(rule); } }
Example #8
Source File: TaskReportTask.java From Pushjet-Android with BSD 2-Clause "Simplified" License | 4 votes |
public void generate(Project project) throws IOException { renderer.showDetail(isDetail()); renderer.addDefaultTasks(project.getDefaultTasks()); AggregateMultiProjectTaskReportModel aggregateModel = new AggregateMultiProjectTaskReportModel(!isDetail()); TaskDetailsFactory taskDetailsFactory = new TaskDetailsFactory(project); SingleProjectTaskReportModel projectTaskModel = new SingleProjectTaskReportModel(taskDetailsFactory); ProjectInternal projectInternal = (ProjectInternal) project; TaskContainerInternal tasks = projectInternal.getTasks(); tasks.actualize(); projectTaskModel.build(Sets.union(tasks, projectInternal.getImplicitTasks())); aggregateModel.add(projectTaskModel); for (Project subproject : project.getSubprojects()) { SingleProjectTaskReportModel subprojectTaskModel = new SingleProjectTaskReportModel(taskDetailsFactory); ProjectInternal subprojectInternal = (ProjectInternal) subproject; TaskContainerInternal subprojectTasks = subprojectInternal.getTasks(); subprojectTasks.actualize(); subprojectTaskModel.build(subprojectTasks); aggregateModel.add(subprojectTaskModel); } aggregateModel.build(); DefaultGroupTaskReportModel model = new DefaultGroupTaskReportModel(); model.build(aggregateModel); for (String group : model.getGroups()) { renderer.startTaskGroup(group); for (TaskDetails task : model.getTasksForGroup(group)) { renderer.addTask(task); for (TaskDetails child : task.getChildren()) { renderer.addChildTask(child); } } } renderer.completeTasks(); for (Rule rule : project.getTasks().getRules()) { renderer.addRule(rule); } }