diff options
-rw-r--r-- | plugins/scalatest/ScalaTest.scala | 12 | ||||
-rw-r--r-- | stage2/BasicBuild.scala | 7 |
2 files changed, 10 insertions, 9 deletions
diff --git a/plugins/scalatest/ScalaTest.scala b/plugins/scalatest/ScalaTest.scala index 21f656b..7f805fd 100644 --- a/plugins/scalatest/ScalaTest.scala +++ b/plugins/scalatest/ScalaTest.scala @@ -27,16 +27,16 @@ object ScalaTestLib{ } } - def discoverSuites(discoveryPath: File, _classLoader: ClassLoader): Seq[String] = { - _classLoader + def discoverSuites(discoveryPath: File, classLoader: ClassLoader): Seq[String] = { + classLoader .loadClass("org.scalatest.tools.SuiteDiscoveryHelper") .getMethod("discoverSuiteNames", classOf[List[_]], classOf[ClassLoader], classOf[Option[_]]) - .invoke(null, List(discoveryPath.string ++ "/"), _classLoader, None) + .invoke(null, List(discoveryPath.string ++ "/"), classLoader, None) .asInstanceOf[Set[String]] .to } - def loadSuite(name: String, _classLoader: ClassLoader) = { - _classLoader.loadClass(name).getConstructor().newInstance().asInstanceOf[Suite] - } + def loadSuite(name: String, classLoader: ClassLoader) = { + classLoader.loadClass(name).getConstructor().newInstance().asInstanceOf[Suite] + } } diff --git a/stage2/BasicBuild.scala b/stage2/BasicBuild.scala index 4ac1903..5212270 100644 --- a/stage2/BasicBuild.scala +++ b/stage2/BasicBuild.scala @@ -125,9 +125,9 @@ trait BaseBuild extends BuildInterface with DependencyImplementation with Trigge def resourceClasspath: ClassPath = { val resourcesDirectory = projectDirectory ++ "/resources" - ClassPath( if(resourcesDirectory.exists) Seq(resourcesDirectory) else Nil ) + ClassPath(Seq(resourcesDirectory).filter(_.exists)) } - def exportedClasspath : ClassPath = { + def exportedClasspath: ClassPath = { compile ClassPath(Seq(compileTarget).filter(_.exists)) ++ resourceClasspath } @@ -189,6 +189,7 @@ trait BaseBuild extends BuildInterface with DependencyImplementation with Trigge Some(new lib.ReflectBuild( DirectoryDependency(projectDirectory++"/test").build ).callNullary(Some("run"))) + def t = test def rt = recursiveUnsafe(Some("test")) @@ -230,7 +231,7 @@ trait BaseBuild extends BuildInterface with DependencyImplementation with Trigge ExitCode.Success } catch { case e: Throwable => println(e.getClass); throw e - } + } } ExitCode.Success } |