use of org.gradle.tooling.model.gradle.BuildInvocations in project gradle by gradle.
the class FetchIncludedBuildInvocations method execute.
@Override
public List<BuildInvocations> execute(BuildController controller) {
List<BuildInvocations> invocations = new ArrayList<BuildInvocations>();
GradleBuild build = controller.getBuildModel();
for (GradleBuild includedBuild : build.getIncludedBuilds()) {
invocations.add(controller.getModel(includedBuild, BuildInvocations.class));
}
return invocations;
}
use of org.gradle.tooling.model.gradle.BuildInvocations in project grails-core by grails.
the class FetchAllTaskSelectorsBuildAction method execute.
public AllTasksModel execute(BuildController controller) {
AllTasksModel model = new AllTasksModel();
Map<String, Set<String>> allTaskSelectors = new LinkedHashMap<String, Set<String>>();
model.allTaskSelectors = allTaskSelectors;
Map<String, Set<String>> allTasks = new LinkedHashMap<String, Set<String>>();
model.allTasks = allTasks;
Map<String, String> projectPaths = new HashMap<String, String>();
model.projectPaths = projectPaths;
for (BasicGradleProject project : controller.getBuildModel().getProjects()) {
BuildInvocations entryPointsForProject = controller.getModel(project, BuildInvocations.class);
Set<String> selectorNames = new LinkedHashSet<String>();
for (TaskSelector selector : entryPointsForProject.getTaskSelectors()) {
selectorNames.add(selector.getName());
}
allTaskSelectors.put(project.getName(), selectorNames);
Set<String> taskNames = new LinkedHashSet<String>();
for (Task task : entryPointsForProject.getTasks()) {
taskNames.add(task.getName());
}
allTasks.put(project.getName(), taskNames);
projectPaths.put(project.getName(), project.getPath());
if (project.getProjectDirectory().getAbsolutePath().equals(currentProjectPath)) {
model.currentProject = project.getName();
}
}
return model;
}
use of org.gradle.tooling.model.gradle.BuildInvocations in project gradle by gradle.
the class FetchAllTaskSelectorsBuildAction method execute.
public Map<String, Set<String>> execute(BuildController controller) {
Map<String, Set<String>> model = new HashMap<String, Set<String>>();
for (BasicGradleProject project : controller.getBuildModel().getProjects()) {
BuildInvocations entryPointsForProject = controller.getModel(project, BuildInvocations.class);
Set<String> selectorNames = new HashSet<String>();
for (TaskSelector selector : entryPointsForProject.getTaskSelectors()) {
selectorNames.add(selector.getName());
}
model.put(project.getName(), selectorNames);
}
return model;
}
Aggregations