private ClassLoader doResolve ( Set < ? extends File > classPath ) { List < URL > urls = new ArrayList < URL > ( classPath . size ( ) ) ; for ( File file : classPath ) { try { urls . add ( file . toURI ( ) . toURL ( ) ) ; } catch ( MalformedURLException exception ) { throw new GradleException ( "Cannot resolve " + file + " as URL" , exception ) ; } } return new URLClassLoader ( urls . toArray ( new URL [ 0 ] ) , ByteBuddy . class . getClassLoader ( ) ) ; }
Resolves a class path to a class loader .