Java Code Examples for org.gradle.internal.classpath.ClassPath#getAsURLArray()

The following examples show how to use org.gradle.internal.classpath.ClassPath#getAsURLArray() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: DefaultToolingImplementationLoader.java    From pushfish-android with BSD 2-Clause "Simplified" License 5 votes vote down vote up
private ClassLoader createImplementationClassLoader(Distribution distribution, ProgressLoggerFactory progressLoggerFactory, File userHomeDir, BuildCancellationToken cancellationToken) {
    ClassPath implementationClasspath = distribution.getToolingImplementationClasspath(progressLoggerFactory, userHomeDir, cancellationToken);
    LOGGER.debug("Using tooling provider classpath: {}", implementationClasspath);
    // On IBM JVM 5, ClassLoader.getResources() uses a combination of findResources() and getParent() and traverses the hierarchy rather than just calling getResources()
    // Wrap our real classloader in one that hides the parent.
    // TODO - move this into FilteringClassLoader
    MultiParentClassLoader parentObfuscatingClassLoader = new MultiParentClassLoader(classLoader);
    FilteringClassLoader filteringClassLoader = new FilteringClassLoader(parentObfuscatingClassLoader);
    filteringClassLoader.allowPackage("org.gradle.tooling.internal.protocol");
    return new MutableURLClassLoader(filteringClassLoader, implementationClasspath.getAsURLArray());
}
 
Example 2
Source File: DefaultToolingImplementationLoader.java    From pushfish-android with BSD 2-Clause "Simplified" License 5 votes vote down vote up
private ClassLoader createImplementationClassLoader(Distribution distribution, ProgressLoggerFactory progressLoggerFactory, File userHomeDir) {
    ClassPath implementationClasspath = distribution.getToolingImplementationClasspath(progressLoggerFactory, userHomeDir);
    LOGGER.debug("Using tooling provider classpath: {}", implementationClasspath);
    // On IBM JVM 5, ClassLoader.getResources() uses a combination of findResources() and getParent() and traverses the hierarchy rather than just calling getResources()
    // Wrap our real classloader in one that hides the parent.
    // TODO - move this into FilteringClassLoader
    MultiParentClassLoader parentObfuscatingClassLoader = new MultiParentClassLoader(classLoader);
    FilteringClassLoader filteringClassLoader = new FilteringClassLoader(parentObfuscatingClassLoader);
    filteringClassLoader.allowPackage("org.gradle.tooling.internal.protocol");
    return new MutableURLClassLoader(filteringClassLoader, implementationClasspath.getAsURLArray());
}
 
Example 3
Source File: DefaultToolingImplementationLoader.java    From Pushjet-Android with BSD 2-Clause "Simplified" License 5 votes vote down vote up
private ClassLoader createImplementationClassLoader(Distribution distribution, ProgressLoggerFactory progressLoggerFactory, File userHomeDir, BuildCancellationToken cancellationToken) {
    ClassPath implementationClasspath = distribution.getToolingImplementationClasspath(progressLoggerFactory, userHomeDir, cancellationToken);
    LOGGER.debug("Using tooling provider classpath: {}", implementationClasspath);
    // On IBM JVM 5, ClassLoader.getResources() uses a combination of findResources() and getParent() and traverses the hierarchy rather than just calling getResources()
    // Wrap our real classloader in one that hides the parent.
    // TODO - move this into FilteringClassLoader
    MultiParentClassLoader parentObfuscatingClassLoader = new MultiParentClassLoader(classLoader);
    FilteringClassLoader filteringClassLoader = new FilteringClassLoader(parentObfuscatingClassLoader);
    filteringClassLoader.allowPackage("org.gradle.tooling.internal.protocol");
    return new MutableURLClassLoader(filteringClassLoader, implementationClasspath.getAsURLArray());
}
 
Example 4
Source File: DefaultToolingImplementationLoader.java    From Pushjet-Android with BSD 2-Clause "Simplified" License 5 votes vote down vote up
private ClassLoader createImplementationClassLoader(Distribution distribution, ProgressLoggerFactory progressLoggerFactory, File userHomeDir) {
    ClassPath implementationClasspath = distribution.getToolingImplementationClasspath(progressLoggerFactory, userHomeDir);
    LOGGER.debug("Using tooling provider classpath: {}", implementationClasspath);
    // On IBM JVM 5, ClassLoader.getResources() uses a combination of findResources() and getParent() and traverses the hierarchy rather than just calling getResources()
    // Wrap our real classloader in one that hides the parent.
    // TODO - move this into FilteringClassLoader
    MultiParentClassLoader parentObfuscatingClassLoader = new MultiParentClassLoader(classLoader);
    FilteringClassLoader filteringClassLoader = new FilteringClassLoader(parentObfuscatingClassLoader);
    filteringClassLoader.allowPackage("org.gradle.tooling.internal.protocol");
    return new MutableURLClassLoader(filteringClassLoader, implementationClasspath.getAsURLArray());
}
 
Example 5
Source File: MutableURLClassLoader.java    From pushfish-android with BSD 2-Clause "Simplified" License 4 votes vote down vote up
public MutableURLClassLoader(ClassLoader parent, ClassPath classPath) {
    super(classPath.getAsURLArray(), parent);
}
 
Example 6
Source File: MutableURLClassLoader.java    From pushfish-android with BSD 2-Clause "Simplified" License 4 votes vote down vote up
public MutableURLClassLoader(ClassLoader parent, ClassPath classPath) {
    super(classPath.getAsURLArray(), parent);
}
 
Example 7
Source File: MutableURLClassLoader.java    From Pushjet-Android with BSD 2-Clause "Simplified" License 4 votes vote down vote up
public MutableURLClassLoader(ClassLoader parent, ClassPath classPath) {
    super(classPath.getAsURLArray(), parent);
}
 
Example 8
Source File: MutableURLClassLoader.java    From Pushjet-Android with BSD 2-Clause "Simplified" License 4 votes vote down vote up
public MutableURLClassLoader(ClassLoader parent, ClassPath classPath) {
    super(classPath.getAsURLArray(), parent);
}