Java 类org.gradle.api.internal.classpath.ModuleRegistry 实例源码

项目:Reer    文件:InProcessGradleExecuter.java   
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;
        }
    };
}
项目:Reer    文件:ForkingTestClassProcessor.java   
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;
}
项目:Reer    文件:DefaultTestExecuter.java   
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;
}
项目:Reer    文件:DefaultIsolatedAntBuilder.java   
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);
}
项目:gradle-dockerized-test-plugin    文件:TestExecuter.java   
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;
}
项目:gradle-dockerized-test-plugin    文件:ForkingTestClassProcessor.java   
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;
}
项目:Pushjet-Android    文件:BuildScopeServices.java   
protected ClassPathRegistry createClassPathRegistry() {
    return new DefaultClassPathRegistry(
            new DefaultClassPathProvider(get(ModuleRegistry.class)),
            new DependencyClassPathProvider(get(ModuleRegistry.class),
                    get(PluginModuleRegistry.class)),
            get(WorkerProcessClassPathProvider.class)
    );
}
项目:Pushjet-Android    文件:BuildScopeServices.java   
protected ClassPathRegistry createClassPathRegistry() {
    return new DefaultClassPathRegistry(
            new DefaultClassPathProvider(get(ModuleRegistry.class)),
            new DependencyClassPathProvider(get(ModuleRegistry.class),
                    get(PluginModuleRegistry.class)),
            get(WorkerProcessClassPathProvider.class));
}
项目:Reer    文件:Test.java   
@Inject
protected ModuleRegistry getModuleRegistry() {
    throw new UnsupportedOperationException();
}
项目:Reer    文件:DependencyClassPathProvider.java   
public DependencyClassPathProvider(ModuleRegistry moduleRegistry, PluginModuleRegistry pluginModuleRegistry) {
    this.moduleRegistry = moduleRegistry;
    this.pluginModuleRegistry = pluginModuleRegistry;
}
项目:Reer    文件:DefaultClassPathProvider.java   
public DefaultClassPathProvider(ModuleRegistry moduleRegistry) {
    this.moduleRegistry = moduleRegistry;
}
项目:Reer    文件:DynamicModulesClassPathProvider.java   
public DynamicModulesClassPathProvider(ModuleRegistry moduleRegistry, PluginModuleRegistry pluginModuleRegistry) {
    this.moduleRegistry = moduleRegistry;
    this.pluginModuleRegistry = pluginModuleRegistry;
}
项目:Reer    文件:GlobalScopeServices.java   
ClassPathRegistry createClassPathRegistry(ModuleRegistry moduleRegistry, PluginModuleRegistry pluginModuleRegistry) {
    return new DefaultClassPathRegistry(
        new DefaultClassPathProvider(moduleRegistry),
        new DynamicModulesClassPathProvider(moduleRegistry,
            pluginModuleRegistry));
}
项目:Reer    文件:GlobalScopeServices.java   
ModuleRegistry createModuleRegistry(CurrentGradleInstallation currentGradleInstallation) {
    return new DefaultModuleRegistry(additionalModuleClassPath, currentGradleInstallation.getInstallation());
}
项目:Reer    文件:GlobalScopeServices.java   
PluginModuleRegistry createPluginModuleRegistry(ModuleRegistry moduleRegistry) {
    return new DefaultPluginModuleRegistry(moduleRegistry);
}
项目:Reer    文件:BuildSessionScopeServices.java   
ClassPathRegistry createClassPathRegistry() {
    return new DefaultClassPathRegistry(
            new DefaultClassPathProvider(get(ModuleRegistry.class)),
            get(WorkerProcessClassPathProvider.class)
    );
}
项目:Reer    文件:BuildScopeServices.java   
protected ClassPathRegistry createClassPathRegistry() {
    ModuleRegistry moduleRegistry = get(ModuleRegistry.class);
    return new DefaultClassPathRegistry(
        new DefaultClassPathProvider(moduleRegistry),
        new DependencyClassPathProvider(moduleRegistry, get(PluginModuleRegistry.class)));
}
项目:Reer    文件:BuildScopeServices.java   
protected IsolatedAntBuilder createIsolatedAntBuilder(ClassPathRegistry classPathRegistry, ClassLoaderFactory classLoaderFactory, ModuleRegistry moduleRegistry) {
    return new DefaultIsolatedAntBuilder(classPathRegistry, classLoaderFactory, moduleRegistry);
}
项目:Reer    文件:GroovyBasePlugin.java   
@Inject
public GroovyBasePlugin(SourceDirectorySetFactory sourceDirectorySetFactory, ModuleRegistry moduleRegistry) {
    this.sourceDirectorySetFactory = sourceDirectorySetFactory;
    this.moduleRegistry = moduleRegistry;
}
项目:Pushjet-Android    文件:DependencyClassPathProvider.java   
public DependencyClassPathProvider(ModuleRegistry moduleRegistry, PluginModuleRegistry pluginModuleRegistry) {
    this.moduleRegistry = moduleRegistry;
    this.pluginModuleRegistry = pluginModuleRegistry;
}
项目:Pushjet-Android    文件:DefaultClassPathProvider.java   
public DefaultClassPathProvider(ModuleRegistry moduleRegistry) {
    this.moduleRegistry = moduleRegistry;
}
项目:Pushjet-Android    文件:DynamicModulesClassPathProvider.java   
public DynamicModulesClassPathProvider(ModuleRegistry moduleRegistry, PluginModuleRegistry pluginModuleRegistry) {
    this.moduleRegistry = moduleRegistry;
    this.pluginModuleRegistry = pluginModuleRegistry;
}
项目:Pushjet-Android    文件:WorkerProcessClassPathProvider.java   
public WorkerProcessClassPathProvider(CacheRepository cacheRepository, ModuleRegistry moduleRegistry) {
    this.cacheRepository = cacheRepository;
    this.moduleRegistry = moduleRegistry;
}
项目:Pushjet-Android    文件:GlobalScopeServices.java   
ClassPathRegistry createClassPathRegistry(ModuleRegistry moduleRegistry, PluginModuleRegistry pluginModuleRegistry) {
    return new DefaultClassPathRegistry(
            new DefaultClassPathProvider(moduleRegistry),
            new DynamicModulesClassPathProvider(moduleRegistry,
                    pluginModuleRegistry));
}
项目:Pushjet-Android    文件:GlobalScopeServices.java   
PluginModuleRegistry createPluginModuleRegistry(ModuleRegistry moduleRegistry) {
    return new DefaultPluginModuleRegistry(moduleRegistry);
}
项目:Pushjet-Android    文件:BuildScopeServices.java   
protected WorkerProcessClassPathProvider createWorkerProcessClassPathProvider(CacheRepository cacheRepository, ModuleRegistry moduleRegistry) {
    return new WorkerProcessClassPathProvider(cacheRepository, moduleRegistry);
}
项目:Pushjet-Android    文件:DependencyClassPathProvider.java   
public DependencyClassPathProvider(ModuleRegistry moduleRegistry, PluginModuleRegistry pluginModuleRegistry) {
    this.moduleRegistry = moduleRegistry;
    this.pluginModuleRegistry = pluginModuleRegistry;
}
项目:Pushjet-Android    文件:DefaultClassPathProvider.java   
public DefaultClassPathProvider(ModuleRegistry moduleRegistry) {
    this.moduleRegistry = moduleRegistry;
}
项目:Pushjet-Android    文件:DynamicModulesClassPathProvider.java   
public DynamicModulesClassPathProvider(ModuleRegistry moduleRegistry, PluginModuleRegistry pluginModuleRegistry) {
    this.moduleRegistry = moduleRegistry;
    this.pluginModuleRegistry = pluginModuleRegistry;
}
项目:Pushjet-Android    文件:WorkerProcessClassPathProvider.java   
public WorkerProcessClassPathProvider(CacheRepository cacheRepository, ModuleRegistry moduleRegistry) {
    this.cacheRepository = cacheRepository;
    this.moduleRegistry = moduleRegistry;
}
项目:Pushjet-Android    文件:GlobalScopeServices.java   
ClassPathRegistry createClassPathRegistry(ModuleRegistry moduleRegistry, PluginModuleRegistry pluginModuleRegistry) {
    return new DefaultClassPathRegistry(
            new DefaultClassPathProvider(moduleRegistry),
            new DynamicModulesClassPathProvider(moduleRegistry,
                    pluginModuleRegistry));
}
项目:Pushjet-Android    文件:GlobalScopeServices.java   
PluginModuleRegistry createPluginModuleRegistry(ModuleRegistry moduleRegistry) {
    return new DefaultPluginModuleRegistry(moduleRegistry);
}
项目:Pushjet-Android    文件:BuildScopeServices.java   
protected WorkerProcessClassPathProvider createWorkerProcessClassPathProvider(CacheRepository cacheRepository, ModuleRegistry moduleRegistry) {
    return new WorkerProcessClassPathProvider(cacheRepository, moduleRegistry);
}