use of org.gradle.api.initialization.ProjectDescriptor in project gradle by gradle.
the class InstantiatingBuildLoader method addProjects.
private void addProjects(ProjectInternal parent, ProjectDescriptor parentProjectDescriptor, GradleInternal gradle, ClassLoaderScope buildRootClassLoaderScope) {
for (ProjectDescriptor childProjectDescriptor : parentProjectDescriptor.getChildren()) {
ProjectInternal childProject = projectFactory.createProject(childProjectDescriptor, parent, gradle, parent.getClassLoaderScope().createChild("project-" + childProjectDescriptor.getName()), buildRootClassLoaderScope);
addProjects(childProject, childProjectDescriptor, gradle, buildRootClassLoaderScope);
}
}
use of org.gradle.api.initialization.ProjectDescriptor in project gradle by gradle.
the class DefaultSettingsLoader method findAndLoadSettings.
@Override
public SettingsInternal findAndLoadSettings(GradleInternal gradle) {
StartParameter startParameter = gradle.getStartParameter();
SettingsInternal settings = findSettingsAndLoadIfAppropriate(gradle, startParameter);
ProjectSpec spec = ProjectSpecs.forStartParameter(startParameter, settings);
if (spec.containsProject(settings.getProjectRegistry())) {
setDefaultProject(spec, settings);
return settings;
}
// Try again with empty settings
StartParameter noSearchParameter = startParameter.newInstance();
noSearchParameter.useEmptySettings();
settings = findSettingsAndLoadIfAppropriate(gradle, noSearchParameter);
// Set explicit build file, if required
if (noSearchParameter.getBuildFile() != null) {
ProjectDescriptor rootProject = settings.getRootProject();
rootProject.setBuildFileName(noSearchParameter.getBuildFile().getName());
}
setDefaultProject(spec, settings);
return settings;
}
Aggregations