use of org.gradle.plugins.ide.internal.tooling.model.BasicGradleProject in project gradle by gradle.
the class GradleBuildBuilder method addProjects.
private void addProjects(BuildState target, DefaultGradleBuild model) {
Map<ProjectState, BasicGradleProject> convertedProjects = new LinkedHashMap<>();
ProjectState rootProject = target.getProjects().getRootProject();
BasicGradleProject convertedRootProject = convert(target, rootProject, convertedProjects);
model.setRootProject(convertedRootProject);
for (ProjectState project : target.getProjects().getAllProjects()) {
model.addProject(convertedProjects.get(project));
}
}
use of org.gradle.plugins.ide.internal.tooling.model.BasicGradleProject in project gradle by gradle.
the class GradleBuildBuilder method convert.
private BasicGradleProject convert(BuildState owner, ProjectState project, Map<ProjectState, BasicGradleProject> convertedProjects) {
DefaultProjectIdentifier id = new DefaultProjectIdentifier(owner.getBuildRootDir(), project.getProjectPath().getPath());
BasicGradleProject converted = new BasicGradleProject().setName(project.getName()).setProjectIdentifier(id);
converted.setProjectDirectory(project.getProjectDir());
if (project.getBuildParent() != null) {
converted.setParent(convertedProjects.get(project.getBuildParent()));
}
convertedProjects.put(project, converted);
for (ProjectState child : project.getChildProjects()) {
converted.addChild(convert(owner, child, convertedProjects));
}
return converted;
}
Aggregations