mirror of https://github.com/sbt/sbt.git
Fix
Have IsolatedClassLoader get preserved by proguard (1.0.0-M10 regression)
This commit is contained in:
parent
15d2afb264
commit
b5b7f7714f
|
|
@ -33,21 +33,21 @@ object Launch {
|
||||||
mainClassLoader(cl.getParent)
|
mainClassLoader(cl.getParent)
|
||||||
}
|
}
|
||||||
|
|
||||||
class IsolatedClassLoader(
|
}
|
||||||
urls: Array[URL],
|
|
||||||
parent: ClassLoader,
|
|
||||||
isolationTargets: Array[String]
|
|
||||||
) extends URLClassLoader(urls, parent) {
|
|
||||||
|
|
||||||
/**
|
class IsolatedClassLoader(
|
||||||
* Applications wanting to access an isolated `ClassLoader` should inspect the hierarchy of
|
urls: Array[URL],
|
||||||
* loaders, and look into each of them for this method, by reflection. Then they should
|
parent: ClassLoader,
|
||||||
* call it (still by reflection), and look for an agreed in advance target in it. If it is found,
|
isolationTargets: Array[String]
|
||||||
* then the corresponding `ClassLoader` is the one with isolated dependencies.
|
) extends URLClassLoader(urls, parent) {
|
||||||
*/
|
|
||||||
def getIsolationTargets: Array[String] = isolationTargets
|
|
||||||
|
|
||||||
}
|
/**
|
||||||
|
* Applications wanting to access an isolated `ClassLoader` should inspect the hierarchy of
|
||||||
|
* loaders, and look into each of them for this method, by reflection. Then they should
|
||||||
|
* call it (still by reflection), and look for an agreed in advance target in it. If it is found,
|
||||||
|
* then the corresponding `ClassLoader` is the one with isolated dependencies.
|
||||||
|
*/
|
||||||
|
def getIsolationTargets: Array[String] = isolationTargets
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -113,7 +113,7 @@ case class Launch(
|
||||||
Console.err.println(s" $f")
|
Console.err.println(s" $f")
|
||||||
}
|
}
|
||||||
|
|
||||||
val isolatedLoader = new Launch.IsolatedClassLoader(
|
val isolatedLoader = new IsolatedClassLoader(
|
||||||
isolatedFiles.map(_.toURI.toURL).toArray,
|
isolatedFiles.map(_.toURI.toURL).toArray,
|
||||||
parent,
|
parent,
|
||||||
Array(target)
|
Array(target)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue