this.moduleRegistry = moduleRegistry;
}
public ClassPath findClassPath(String name) {
if (name.equals("GRADLE_RUNTIME")) {
ClassPath classpath = new DefaultClassPath();
for (Module module : moduleRegistry.getModule("gradle-launcher").getAllRequiredModules()) {
classpath = classpath.plus(module.getClasspath());
}
return classpath;
}
if (name.equals("GRADLE_CORE")) {
return moduleRegistry.getModule("gradle-core").getImplementationClasspath();
}
if (name.equals("GRADLE_BASE_SERVICES")) {
return moduleRegistry.getModule("gradle-base-services").getImplementationClasspath();
}
if (name.equals("COMMONS_CLI")) {
return moduleRegistry.getExternalModule("commons-cli").getClasspath();
}
if (name.equals("ANT")) {
ClassPath classpath = new DefaultClassPath();
classpath = classpath.plus(moduleRegistry.getExternalModule("ant").getClasspath());
classpath = classpath.plus(moduleRegistry.getExternalModule("ant-launcher").getClasspath());
return classpath;
}
if (name.equals("GROOVY")) {
return moduleRegistry.getExternalModule("groovy-all").getClasspath();
}