use of org.gradle.tooling.model.gradle.BasicGradleProject in project gradle by gradle.
the class ComplexCustomModelBuildingAction method execute.
@Override
public Map<String, CustomModel> execute(BuildController controller) {
Map<String, CustomModel> result = new HashMap<String, CustomModel>();
for (BasicGradleProject project : controller.getBuildModel().getProjects()) {
result.put(project.getPath(), controller.getModel(project, CustomModel.class));
}
CustomModel rootProjectModel = controller.getModel(controller.getBuildModel().getRootProject(), CustomModel.class);
for (CustomModel customModel : result.values()) {
assert customModel.getThing() == rootProjectModel.getThing();
}
return result;
}
Aggregations