diff options
author | Christopher Vogt <oss.nsp@cvogt.org> | 2017-03-30 10:47:28 -0400 |
---|---|---|
committer | Christopher Vogt <oss.nsp@cvogt.org> | 2017-03-30 11:03:55 -0400 |
commit | 3446af59a17bdef8730008a61eade7937b9cda56 (patch) | |
tree | c3785086e3a9985abde78477a3b4bd997b512273 /stage2 | |
parent | 249b4a04bac50fcb9510e71ad142fcabf7b7f61d (diff) | |
download | cbt-3446af59a17bdef8730008a61eade7937b9cda56.tar.gz cbt-3446af59a17bdef8730008a61eade7937b9cda56.tar.bz2 cbt-3446af59a17bdef8730008a61eade7937b9cda56.zip |
scalatest plugin for 2.12 (and move most code from plugin into library)
Diffstat (limited to 'stage2')
-rw-r--r-- | stage2/BasicBuild.scala | 2 | ||||
-rw-r--r-- | stage2/DirectoryDependency.scala | 8 | ||||
-rw-r--r-- | stage2/libraries.scala | 11 |
3 files changed, 16 insertions, 5 deletions
diff --git a/stage2/BasicBuild.scala b/stage2/BasicBuild.scala index 067d1b7..2cf97e5 100644 --- a/stage2/BasicBuild.scala +++ b/stage2/BasicBuild.scala @@ -20,7 +20,7 @@ trait BaseBuild extends BuildInterface with DependencyImplementation with SbtDep lazy val moduleKey: String = "BaseBuild("+target.string+")" implicit def transientCache: java.util.Map[AnyRef,AnyRef] = context.transientCache - implicit def libraries(implicit context: Context): libraries = new libraries(context) + implicit def libraries(implicit context: Context): libraries = new libraries(context, scalaVersion) // library available to builds implicit protected final val logger: Logger = context.logger diff --git a/stage2/DirectoryDependency.scala b/stage2/DirectoryDependency.scala index 6ebb988..f2b5557 100644 --- a/stage2/DirectoryDependency.scala +++ b/stage2/DirectoryDependency.scala @@ -57,7 +57,9 @@ object DirectoryDependency { // the beginning. Instead CBT always needs to build the pure Java // Launcher in the checkout with itself and then run it via reflection. val ( checkoutDirectory, dependency ) = - GitDependency.withCheckoutDirectory( base, hash, Some( "nailgun_launcher" ) )( context ) + GitDependency.withCheckoutDirectory( base, hash, Some( "nailgun_launcher" ) )( + context.copy( scalaVersion = None ) + ) dependency .dependency .asInstanceOf[BaseBuild] // should work because nailgun_launcher/ has no cbt build of it's own @@ -71,7 +73,9 @@ object DirectoryDependency { def loadCustomBuild: AnyRef = { lib.logger.composition( "Loading build at " ++ buildDirectory.string ) - val buildBuild = apply( buildDirectory, None )( context ).dependency.asInstanceOf[BuildInterface] + val buildBuild = apply( + context.copy( workingDirectory = buildDirectory, scalaVersion = None ), None + ).dependency.asInstanceOf[BuildInterface] import buildBuild._ val managedContext = context.copy( parentBuild = Some( buildBuild ) ) diff --git a/stage2/libraries.scala b/stage2/libraries.scala index 3d2951c..f0e4ecc 100644 --- a/stage2/libraries.scala +++ b/stage2/libraries.scala @@ -1,6 +1,12 @@ package cbt -class libraries( context: Context ) { - private def dep( name: String ) = DirectoryDependency( context.cbtHome / "libraries" / name )( context ) +class libraries( context: Context, scalaVersion: String ) { + private def dep( name: String ) = DirectoryDependency( + context.copy( + scalaVersion = Some( scalaVersion ), + workingDirectory = context.cbtHome / "libraries" / name + ), + None + ) def captureArgs = dep( "capture_args" ) def eval = dep( "eval" ) def file = dep( "file" ) @@ -9,4 +15,5 @@ class libraries( context: Context ) { def common_0 = dep( "common-0" ) def common_1 = dep( "common-1" ) def interfaces = dep( "interfaces" ) + def scalatestRunner = dep( "scalatest-runner" ) } |