aboutsummaryrefslogtreecommitdiff
path: root/stage2/BuildBuild.scala
diff options
context:
space:
mode:
authorChristopher Vogt <oss.nsp@cvogt.org>2016-11-08 00:58:30 -0500
committerChristopher Vogt <oss.nsp@cvogt.org>2016-11-08 00:58:30 -0500
commit47a93993a84c572b4a2cd4562b52ec552f36879a (patch)
treeb21c25f2f4b593101d47dd7ddf178b2624fef10b /stage2/BuildBuild.scala
parent8ccefab7f8a09579087626fe75911115e8f6f483 (diff)
downloadcbt-47a93993a84c572b4a2cd4562b52ec552f36879a.tar.gz
cbt-47a93993a84c572b4a2cd4562b52ec552f36879a.tar.bz2
cbt-47a93993a84c572b4a2cd4562b52ec552f36879a.zip
Add support for dynamic re-configuration.
The exact precedence rule of override code vs original code may still need to be tweaked as we go along.
Diffstat (limited to 'stage2/BuildBuild.scala')
-rw-r--r--stage2/BuildBuild.scala17
1 files changed, 14 insertions, 3 deletions
diff --git a/stage2/BuildBuild.scala b/stage2/BuildBuild.scala
index 68603da..5eb7622 100644
--- a/stage2/BuildBuild.scala
+++ b/stage2/BuildBuild.scala
@@ -1,14 +1,18 @@
package cbt
import java.nio.file._
-trait BuildBuild extends BaseBuild{
- private final val managedContext = context.copy(
+trait BuildBuild extends BuildBuildWithoutEssentials{
+ override def dependencies =
+ super.dependencies :+ plugins.essentials
+}
+trait BuildBuildWithoutEssentials extends BaseBuild{
+ protected final val managedContext = context.copy(
projectDirectory = managedBuildDirectory,
parentBuild=Some(this)
)
object plugins{
- // TODO: maybe move this out of the OO?
+ // TODO: move this out of the OO
final lazy val scalaTest = DirectoryDependency( context.cbtHome ++ "/plugins/scalatest" )
final lazy val sbtLayout = DirectoryDependency( context.cbtHome ++ "/plugins/sbt_layout" )
final lazy val scalaJs = DirectoryDependency( context.cbtHome ++ "/plugins/scalajs" )
@@ -17,6 +21,7 @@ trait BuildBuild extends BaseBuild{
final lazy val wartremover = DirectoryDependency( context.cbtHome ++ "/plugins/wartremover" )
final lazy val uberJar = DirectoryDependency( context.cbtHome ++ "/plugins/uber-jar" )
final lazy val sonatypeRelease = DirectoryDependency( context.cbtHome ++ "/plugins/sonatype-release" )
+ final lazy val essentials = DirectoryDependency( context.cbtHome ++ "/plugins/essentials" )
}
override def dependencies =
@@ -64,6 +69,12 @@ trait BuildBuild extends BaseBuild{
throw new Exception(
"No file build.scala (lower case) found in " ++ projectDirectory.getPath
)
+ /*
+ // is this not needed?
+ } else if( projectDirectory.getParentFile.getName == "build" && projectDirectory.getParentFile.getParentFile.getName == "build" ){
+ // can't use essentiasy, when building essentials themselves
+ new BasicBuild( managedContext ) with BuildBuildWithoutEssentials
+ */
} else if( projectDirectory.getParentFile.getName == "build" ){
new BasicBuild( managedContext ) with BuildBuild
} else {