diff options
Diffstat (limited to 'core/src')
-rw-r--r-- | core/src/mill/eval/Evaluator.scala | 5 | ||||
-rw-r--r-- | core/src/mill/modules/Jvm.scala | 8 |
2 files changed, 5 insertions, 8 deletions
diff --git a/core/src/mill/eval/Evaluator.scala b/core/src/mill/eval/Evaluator.scala index 78317474..9d65e95f 100644 --- a/core/src/mill/eval/Evaluator.scala +++ b/core/src/mill/eval/Evaluator.scala @@ -45,6 +45,7 @@ class Evaluator[T](val outPath: Path, val finalTaskOverrides = t match{ case t: Target[_] => rootModule.millInternal.segmentsToTargets.get(segments).fold(0)(_.ctx.overrides) + case c: mill.define.Command[_] => def findMatching(cls: Class[_]): Option[Seq[(Int, EntryPoint[_])]] = { discover.value.get(cls) match{ @@ -56,8 +57,8 @@ class Evaluator[T](val outPath: Path, } } } - val public = findMatching(c.cls).get.find(_._2.name == c.ctx.segment.pathSegments.head).get._1 - public + findMatching(c.cls).get.find(_._2.name == c.ctx.segment.pathSegments.head).get._1 + case c: mill.define.Worker[_] => 0 } diff --git a/core/src/mill/modules/Jvm.scala b/core/src/mill/modules/Jvm.scala index 4ac03a97..297dcf1f 100644 --- a/core/src/mill/modules/Jvm.scala +++ b/core/src/mill/modules/Jvm.scala @@ -67,9 +67,7 @@ object Jvm { body: ClassLoader => T): T = { val cl = if (classLoaderOverrideSbtTesting) { val outerClassLoader = getClass.getClassLoader - new URLClassLoader( - classPath.map(_.toIO.toURI.toURL).toArray, - ClassLoader.getSystemClassLoader().getParent()){ + new URLClassLoader(classPath.map(_.toIO.toURI.toURL).toArray, null){ override def findClass(name: String) = { if (name.startsWith("sbt.testing.")){ outerClassLoader.loadClass(name) @@ -79,9 +77,7 @@ object Jvm { } } } else { - new URLClassLoader( - classPath.map(_.toIO.toURI.toURL).toArray, - ClassLoader.getSystemClassLoader().getParent()) + new URLClassLoader(classPath.map(_.toIO.toURI.toURL).toArray, null) } val oldCl = Thread.currentThread().getContextClassLoader Thread.currentThread().setContextClassLoader(cl) |