diff options
author | Christopher Vogt <oss.nsp@cvogt.org> | 2016-11-08 00:58:30 -0500 |
---|---|---|
committer | Christopher Vogt <oss.nsp@cvogt.org> | 2016-11-08 00:58:30 -0500 |
commit | 47a93993a84c572b4a2cd4562b52ec552f36879a (patch) | |
tree | b21c25f2f4b593101d47dd7ddf178b2624fef10b /stage2/Lib.scala | |
parent | 8ccefab7f8a09579087626fe75911115e8f6f483 (diff) | |
download | cbt-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/Lib.scala')
-rw-r--r-- | stage2/Lib.scala | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/stage2/Lib.scala b/stage2/Lib.scala index 25183a3..3f6242f 100644 --- a/stage2/Lib.scala +++ b/stage2/Lib.scala @@ -48,7 +48,19 @@ final class Lib(logger: Logger) extends Stage1Lib(logger) with Scaffold{ val rootBuildClassName = if( useBasicBuildBuild ) buildBuildClassName else buildClassName try{ - if(useBasicBuildBuild) default( context ) else new cbt.BasicBuild( context.copy( projectDirectory = start ) ) with BuildBuild + if(useBasicBuildBuild) + default( context ) + else if( + // essentials depends on eval, which has a build that depends on scalatest + // this means in these we can't depend on essentials + // hopefully we find a better way that this pretty hacky exclusion rule + context.projectDirectory == (context.cbtHome ++ "/plugins/essentials") + || context.projectDirectory == (context.cbtHome ++ "/libraries/eval") + || context.projectDirectory == (context.cbtHome ++ "/plugins/scalatest") + ) + new cbt.BasicBuild( context.copy( projectDirectory = start ) ) with BuildBuildWithoutEssentials + else + new cbt.BasicBuild( context.copy( projectDirectory = start ) ) with BuildBuild } catch { case e:ClassNotFoundException if e.getMessage == rootBuildClassName => throw new Exception(s"no class $rootBuildClassName found in " ++ start.string) |