コード例 #1
0
 protected ScriptHandler createScriptHandler() {
   ScriptHandlerFactory factory =
       new DefaultScriptHandlerFactory(
           get(DependencyManagementServices.class),
           get(FileResolver.class),
           get(DependencyMetaDataProvider.class));
   return factory.create(project.getBuildScriptSource(), project.getClassLoaderScope(), project);
 }
コード例 #2
0
 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);
   }
 }