use of org.gradle.tooling.model.gradle.GradleBuild in project gradle by gradle.
the class ActionRunsNestedActions method execute.
@Override
public Models execute(BuildController controller) {
GradleBuild buildModel = controller.getBuildModel();
List<GetProjectModel> projectActions = new ArrayList<GetProjectModel>();
for (BasicGradleProject project : buildModel.getProjects()) {
projectActions.add(new GetProjectModel(project));
}
List<CustomModel> results = controller.run(projectActions);
return new Models(controller.getCanQueryProjectModelInParallel(CustomModel.class), results);
}
use of org.gradle.tooling.model.gradle.GradleBuild in project gradle by gradle.
the class FetchCustomModelForEachProject method execute.
@Override
public List<SomeToolingModel> execute(BuildController controller) {
List<SomeToolingModel> 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);
}
}
return result;
}
Aggregations