use of org.gradle.tooling.model.eclipse.EclipseProject in project gradle by gradle.
the class UseOtherTypesToFetchProjectModel method execute.
public Map<String, CustomModel> execute(BuildController controller) {
// Use an IdeaModule to reference a project
IdeaProject ideaProject = controller.getModel(IdeaProject.class);
for (IdeaModule ideaModule : ideaProject.getModules()) {
visit(ideaModule, controller, new HashMap<String, CustomModel>());
}
// Use an EclipseProject to reference a project
EclipseProject eclipseProject = controller.getModel(EclipseProject.class);
visit(eclipseProject, controller, new HashMap<String, CustomModel>());
// Use a GradleProject to reference a project
GradleProject rootProject = controller.getModel(GradleProject.class);
Map<String, CustomModel> projects = new HashMap<String, CustomModel>();
visit(rootProject, controller, projects);
return projects;
}
use of org.gradle.tooling.model.eclipse.EclipseProject in project gradle by gradle.
the class FetchEclipseProjects method execute.
@Override
public List<EclipseProject> execute(BuildController controller) {
List<EclipseProject> eclipseProjects = new ArrayList<EclipseProject>();
GradleBuild build = controller.getBuildModel();
collectEclipseProjects(build, eclipseProjects, controller);
return eclipseProjects;
}
Aggregations