use of org.gradle.tooling.model.gradle.GradleBuild in project gradle by gradle.
the class FetchBuildEnvironments method execute.
@Override
public List<BuildEnvironment> execute(BuildController controller) {
List<BuildEnvironment> environments = new ArrayList<BuildEnvironment>();
GradleBuild build = controller.getBuildModel();
environments.add(controller.getModel(build, BuildEnvironment.class));
for (GradleBuild includedBuild : build.getIncludedBuilds()) {
environments.add(controller.getModel(includedBuild, BuildEnvironment.class));
}
return environments;
}
use of org.gradle.tooling.model.gradle.GradleBuild in project gradle by gradle.
the class FetchBuildEnvironments method execute.
@Override
public List<BuildEnvironment> execute(BuildController controller) {
List<BuildEnvironment> environments = new ArrayList<BuildEnvironment>();
GradleBuild build = controller.getBuildModel();
environments.add(controller.getModel(build, BuildEnvironment.class));
for (GradleBuild includedBuild : build.getIncludedBuilds()) {
environments.add(controller.getModel(includedBuild, BuildEnvironment.class));
}
return environments;
}
use of org.gradle.tooling.model.gradle.GradleBuild in project gradle by gradle.
the class FetchCustomModelForEachProjectInTree method execute.
@Override
public List<SomeToolingModel> execute(BuildController controller) {
List<SomeToolingModel> result = new ArrayList<>();
GradleBuild buildModel = controller.getBuildModel();
collectModelsForProjects(controller, result, buildModel);
for (GradleBuild build : buildModel.getEditableBuilds()) {
collectModelsForProjects(controller, result, build);
}
return result;
}
use of org.gradle.tooling.model.gradle.GradleBuild in project gradle by gradle.
the class FetchPartialCustomModelForEachProject method execute.
@Override
public List<String> execute(BuildController controller) {
List<String> result = new ArrayList<>();
GradleBuild buildModel = controller.getBuildModel();
for (BasicGradleProject project : buildModel.getProjects()) {
SomeToolingModel model = controller.findModel(project, SomeToolingModel.class);
if (model != null) {
result.add(model.getMessage());
}
}
return result;
}
use of org.gradle.tooling.model.gradle.GradleBuild in project gradle by gradle.
the class FetchCustomModelForEachProjectInParallel method execute.
@Override
public List<SomeToolingModel> execute(BuildController controller) {
List<FetchModelForProject> actions = new ArrayList<>();
GradleBuild buildModel = controller.getBuildModel();
for (BasicGradleProject project : buildModel.getProjects()) {
actions.add(new FetchModelForProject(project));
}
return controller.run(actions);
}
Aggregations