Exemple #1
0
 private void addProjects(
     ProjectInternal parent,
     ProjectDescriptor parentProjectDescriptor,
     BuildInternal build,
     Map<String, String> externalProjectProperties) {
   for (ProjectDescriptor childProjectDescriptor : parentProjectDescriptor.getChildren()) {
     ProjectInternal childProject =
         projectFactory.createProject(childProjectDescriptor, parent, build);
     addPropertiesToProject(externalProjectProperties, childProject);
     addProjects(childProject, childProjectDescriptor, build, externalProjectProperties);
   }
 }
Exemple #2
0
  private DefaultBuild createProjects(
      ProjectDescriptor rootProjectDescriptor,
      ClassLoader buildScriptClassLoader,
      StartParameter startParameter,
      Map<String, String> externalProjectProperties) {
    DefaultBuild build = new DefaultBuild(startParameter, buildScriptClassLoader);
    ProjectInternal rootProject = projectFactory.createProject(rootProjectDescriptor, null, build);
    build.setRootProject(rootProject);

    addPropertiesToProject(externalProjectProperties, rootProject);
    addProjects(rootProject, rootProjectDescriptor, build, externalProjectProperties);
    return build;
  }
 private void createProjects(
     ProjectDescriptor rootProjectDescriptor,
     GradleInternal gradle,
     ClassLoaderScope buildRootClassLoaderScope) {
   ProjectInternal rootProject =
       projectFactory.createProject(
           rootProjectDescriptor,
           null,
           gradle,
           buildRootClassLoaderScope.createChild("root-project"),
           buildRootClassLoaderScope);
   gradle.setRootProject(rootProject);
   addProjects(rootProject, rootProjectDescriptor, gradle, buildRootClassLoaderScope);
 }
 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);
   }
 }