use of org.gradle.plugins.ide.eclipse.model.EclipseModel in project gradle by gradle.
the class EclipseModelBuilder method buildHierarchy.
private DefaultEclipseProject buildHierarchy(Project project) {
List<DefaultEclipseProject> children = new ArrayList<>();
for (Project child : project.getChildProjects().values()) {
children.add(buildHierarchy(child));
}
EclipseModel eclipseModel = project.getExtensions().getByType(EclipseModel.class);
org.gradle.plugins.ide.eclipse.model.EclipseProject internalProject = eclipseModel.getProject();
String name = internalProject.getName();
String description = GUtil.elvis(internalProject.getComment(), null);
DefaultEclipseProject eclipseProject = new DefaultEclipseProject(name, project.getPath(), description, project.getProjectDir(), children).setGradleProject(rootGradleProject.findByPath(project.getPath()));
for (DefaultEclipseProject child : children) {
child.setParent(eclipseProject);
}
addProject(project, eclipseProject);
return eclipseProject;
}
Aggregations