예제 #1
0
 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 applyScript(Object script) {
   URI scriptUri = resolver.resolveUri(script);
   UriScriptSource scriptSource = new UriScriptSource("script", scriptUri);
   ClassLoaderScope classLoaderScopeChild = classLoaderScope.createChild();
   ScriptHandler scriptHandler = scriptHandlerFactory.create(scriptSource, classLoaderScopeChild);
   ScriptPlugin configurer =
       configurerFactory.create(
           scriptSource,
           scriptHandler,
           classLoaderScopeChild,
           classLoaderScope,
           "buildscript",
           DefaultScript.class,
           false);
   for (Object target : targets) {
     configurer.apply(target);
   }
 }