use of org.gradle.tooling.internal.gradle.DefaultGradleBuild in project gradle by gradle.
the class GradleBuildBuilder method convert.
private DefaultGradleBuild convert(Gradle gradle) {
DefaultGradleBuild model = new DefaultGradleBuild();
Map<Project, BasicGradleProject> convertedProjects = new LinkedHashMap<Project, BasicGradleProject>();
Project rootProject = gradle.getRootProject();
BasicGradleProject convertedRootProject = convert(rootProject, convertedProjects);
model.setRootProject(convertedRootProject);
for (Project project : rootProject.getAllprojects()) {
model.addProject(convertedProjects.get(project));
}
for (IncludedBuild includedBuild : gradle.getIncludedBuilds()) {
Gradle includedGradle = ((IncludedBuildInternal) includedBuild).getConfiguredBuild();
DefaultGradleBuild convertedIncludedBuild = convert(includedGradle);
model.addIncludedBuild(convertedIncludedBuild);
}
return model;
}
use of org.gradle.tooling.internal.gradle.DefaultGradleBuild in project gradle by gradle.
the class GradleBuildConverter method convert.
public DefaultGradleBuild convert(GradleProject project) {
DefaultGradleBuild gradleBuild = new DefaultGradleBuild();
PartialBasicGradleProject rootProject = toPartialGradleProject(project);
gradleBuild.setRootProject(rootProject);
gradleBuild.addProject(rootProject);
convertChildren(gradleBuild, rootProject, project);
return gradleBuild;
}
use of org.gradle.tooling.internal.gradle.DefaultGradleBuild in project gradle by gradle.
the class GradleBuildAdapterProducer method produceModel.
public <T> T produceModel(Class<T> type, ConsumerOperationParameters operationParameters) {
if (type.equals(GradleBuild.class)) {
GradleProject gradleProject = delegate.produceModel(GradleProject.class, operationParameters);
final DefaultGradleBuild convert = new GradleBuildConverter().convert(gradleProject);
return mappingProvider.applyCompatibilityMapping(adapter.builder(type), operationParameters).build(convert);
}
return delegate.produceModel(type, operationParameters);
}
Aggregations