private Factory<JavaExecHandleBuilder> getJavaExecBuilder() { return new Factory<JavaExecHandleBuilder>() { public JavaExecHandleBuilder create() { GradleInvocation invocation = buildInvocation(); JavaExecHandleBuilder builder = new JavaExecHandleBuilder(TestFiles.resolver()); builder.workingDir(getWorkingDir()); builder.setExecutable(new File(getJavaHome(), "bin/java")); Collection<File> classpath = cleanup(GLOBAL_SERVICES.get(ModuleRegistry.class).getAdditionalClassPath().getAsFiles()); builder.classpath(classpath); builder.jvmArgs(invocation.launcherJvmArgs); builder.setMain(Main.class.getName()); builder.args(invocation.args); builder.setStandardInput(connectStdIn()); return builder; } }; }
public ForkingTestClassProcessor(WorkerProcessFactory workerFactory, WorkerTestClassProcessorFactory processorFactory, JavaForkOptions options, Iterable<File> classPath, Action<WorkerProcessBuilder> buildConfigAction, ModuleRegistry moduleRegistry, BuildOperationWorkerRegistry.Operation owner) { this.workerFactory = workerFactory; this.processorFactory = processorFactory; this.options = options; this.classPath = classPath; this.buildConfigAction = buildConfigAction; this.moduleRegistry = moduleRegistry; this.owner = owner; }
public DefaultTestExecuter(WorkerProcessFactory workerFactory, ActorFactory actorFactory, ModuleRegistry moduleRegistry, BuildOperationWorkerRegistry buildOperationWorkerRegistry, BuildOperationExecutor buildOperationExecutor) { this.workerFactory = workerFactory; this.actorFactory = actorFactory; this.moduleRegistry = moduleRegistry; this.buildOperationWorkerRegistry = buildOperationWorkerRegistry; this.buildOperationExecutor = buildOperationExecutor; }
public DefaultIsolatedAntBuilder(ClassPathRegistry classPathRegistry, ClassLoaderFactory classLoaderFactory, ModuleRegistry moduleRegistry) { this.classPathRegistry = classPathRegistry; this.classLoaderFactory = classLoaderFactory; this.moduleRegistry = moduleRegistry; this.libClasspath = new DefaultClassPath(); GroovySystemLoaderFactory groovySystemLoaderFactory = new GroovySystemLoaderFactory(); this.classLoaderCache = new ClassPathToClassLoaderCache(groovySystemLoaderFactory); List<File> antClasspath = Lists.newArrayList(classPathRegistry.getClassPath("ANT").getAsFiles()); // Need tools.jar for compile tasks File toolsJar = Jvm.current().getToolsJar(); if (toolsJar != null) { antClasspath.add(toolsJar); } antLoader = classLoaderFactory.createIsolatedClassLoader(new DefaultClassPath(antClasspath)); FilteringClassLoader.Spec loggingLoaderSpec = new FilteringClassLoader.Spec(); loggingLoaderSpec.allowPackage("org.slf4j"); loggingLoaderSpec.allowPackage("org.apache.commons.logging"); loggingLoaderSpec.allowPackage("org.apache.log4j"); loggingLoaderSpec.allowClass(Logger.class); loggingLoaderSpec.allowClass(LogLevel.class); FilteringClassLoader loggingLoader = new FilteringClassLoader(getClass().getClassLoader(), loggingLoaderSpec); this.baseAntLoader = new CachingClassLoader(new MultiParentClassLoader(antLoader, loggingLoader)); // Need gradle core to pick up ant logging adapter, AntBuilder and such ClassPath gradleCoreUrls = moduleRegistry.getModule("gradle-core").getImplementationClasspath(); gradleCoreUrls = gradleCoreUrls.plus(moduleRegistry.getModule("gradle-logging").getImplementationClasspath()); gradleCoreUrls = gradleCoreUrls.plus(moduleRegistry.getExternalModule("groovy-all").getClasspath()); // Need Transformer (part of AntBuilder API) from base services gradleCoreUrls = gradleCoreUrls.plus(moduleRegistry.getModule("gradle-base-services").getImplementationClasspath()); this.antAdapterLoader = new VisitableURLClassLoader(baseAntLoader, gradleCoreUrls); gradleApiGroovyLoader = groovySystemLoaderFactory.forClassLoader(this.getClass().getClassLoader()); antAdapterGroovyLoader = groovySystemLoaderFactory.forClassLoader(antAdapterLoader); }
public TestExecuter(WorkerProcessFactory workerFactory, ActorFactory actorFactory, ModuleRegistry moduleRegistry, BuildOperationExecutor buildOperationExecutor, Clock clock) { this.workerFactory = workerFactory; this.actorFactory = actorFactory; this.moduleRegistry = moduleRegistry; this.buildOperationExecutor = buildOperationExecutor; this.clock = clock; }
public ForkingTestClassProcessor(WorkerProcessFactory workerFactory, WorkerTestClassProcessorFactory processorFactory, JavaForkOptions options, Iterable<File> classPath, Action<WorkerProcessBuilder> buildConfigAction, ModuleRegistry moduleRegistry) { this.workerFactory = workerFactory; this.processorFactory = processorFactory; this.options = options; this.classPath = classPath; this.buildConfigAction = buildConfigAction; this.moduleRegistry = moduleRegistry; }
protected ClassPathRegistry createClassPathRegistry() { return new DefaultClassPathRegistry( new DefaultClassPathProvider(get(ModuleRegistry.class)), new DependencyClassPathProvider(get(ModuleRegistry.class), get(PluginModuleRegistry.class)), get(WorkerProcessClassPathProvider.class) ); }
protected ClassPathRegistry createClassPathRegistry() { return new DefaultClassPathRegistry( new DefaultClassPathProvider(get(ModuleRegistry.class)), new DependencyClassPathProvider(get(ModuleRegistry.class), get(PluginModuleRegistry.class)), get(WorkerProcessClassPathProvider.class)); }
@Inject protected ModuleRegistry getModuleRegistry() { throw new UnsupportedOperationException(); }
public DependencyClassPathProvider(ModuleRegistry moduleRegistry, PluginModuleRegistry pluginModuleRegistry) { this.moduleRegistry = moduleRegistry; this.pluginModuleRegistry = pluginModuleRegistry; }
public DefaultClassPathProvider(ModuleRegistry moduleRegistry) { this.moduleRegistry = moduleRegistry; }
public DynamicModulesClassPathProvider(ModuleRegistry moduleRegistry, PluginModuleRegistry pluginModuleRegistry) { this.moduleRegistry = moduleRegistry; this.pluginModuleRegistry = pluginModuleRegistry; }
ClassPathRegistry createClassPathRegistry(ModuleRegistry moduleRegistry, PluginModuleRegistry pluginModuleRegistry) { return new DefaultClassPathRegistry( new DefaultClassPathProvider(moduleRegistry), new DynamicModulesClassPathProvider(moduleRegistry, pluginModuleRegistry)); }
ModuleRegistry createModuleRegistry(CurrentGradleInstallation currentGradleInstallation) { return new DefaultModuleRegistry(additionalModuleClassPath, currentGradleInstallation.getInstallation()); }
PluginModuleRegistry createPluginModuleRegistry(ModuleRegistry moduleRegistry) { return new DefaultPluginModuleRegistry(moduleRegistry); }
ClassPathRegistry createClassPathRegistry() { return new DefaultClassPathRegistry( new DefaultClassPathProvider(get(ModuleRegistry.class)), get(WorkerProcessClassPathProvider.class) ); }
protected ClassPathRegistry createClassPathRegistry() { ModuleRegistry moduleRegistry = get(ModuleRegistry.class); return new DefaultClassPathRegistry( new DefaultClassPathProvider(moduleRegistry), new DependencyClassPathProvider(moduleRegistry, get(PluginModuleRegistry.class))); }
protected IsolatedAntBuilder createIsolatedAntBuilder(ClassPathRegistry classPathRegistry, ClassLoaderFactory classLoaderFactory, ModuleRegistry moduleRegistry) { return new DefaultIsolatedAntBuilder(classPathRegistry, classLoaderFactory, moduleRegistry); }
@Inject public GroovyBasePlugin(SourceDirectorySetFactory sourceDirectorySetFactory, ModuleRegistry moduleRegistry) { this.sourceDirectorySetFactory = sourceDirectorySetFactory; this.moduleRegistry = moduleRegistry; }
public WorkerProcessClassPathProvider(CacheRepository cacheRepository, ModuleRegistry moduleRegistry) { this.cacheRepository = cacheRepository; this.moduleRegistry = moduleRegistry; }
protected WorkerProcessClassPathProvider createWorkerProcessClassPathProvider(CacheRepository cacheRepository, ModuleRegistry moduleRegistry) { return new WorkerProcessClassPathProvider(cacheRepository, moduleRegistry); }