diff options
author | Christopher Vogt <oss.nsp@cvogt.org> | 2017-02-13 22:54:12 -0500 |
---|---|---|
committer | Christopher Vogt <oss.nsp@cvogt.org> | 2017-02-13 23:58:43 -0500 |
commit | b8e3edf032c60e8c9ae4f28d5c3ac2e2720308cc (patch) | |
tree | 859a6a25651a56ba92ec158fdb03f542d57202bd /stage2/Lib.scala | |
parent | e0fb6ec75286c695b7e4c5ed9189714d40f9b672 (diff) | |
download | cbt-b8e3edf032c60e8c9ae4f28d5c3ac2e2720308cc.tar.gz cbt-b8e3edf032c60e8c9ae4f28d5c3ac2e2720308cc.tar.bz2 cbt-b8e3edf032c60e8c9ae4f28d5c3ac2e2720308cc.zip |
easier setting of projectDirectory in sub-builds
by replacing context.projectDirectory by workingDirectory and using
it as the default but allowing it to being overridden
Diffstat (limited to 'stage2/Lib.scala')
-rw-r--r-- | stage2/Lib.scala | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/stage2/Lib.scala b/stage2/Lib.scala index fcf2642..d5119a7 100644 --- a/stage2/Lib.scala +++ b/stage2/Lib.scala @@ -31,7 +31,7 @@ final class Lib(val logger: Logger) extends Stage1Lib(logger) with Scaffold{ if(buildDir.exists) findStartDir(buildDir) else directory } - val directory = context.projectDirectory + val directory = context.workingDirectory context.logger.composition( context.logger.showInvocation("Build.loadRoot",directory) ) @@ -41,7 +41,7 @@ final class Lib(val logger: Logger) extends Stage1Lib(logger) with Scaffold{ try{ if(useBasicBuild) { - new BasicBuild( context.copy( projectDirectory = directory) ) + new BasicBuild( context.copy( workingDirectory = directory ) ) } else if( // essentials depends on eval, which has a build that depends on scalatest // this means in these we can't depend on essentials @@ -50,9 +50,9 @@ final class Lib(val logger: Logger) extends Stage1Lib(logger) with Scaffold{ || directory == (context.cbtHome ++ "/libraries/eval") || directory == (context.cbtHome ++ "/plugins/scalatest") ) - new cbt.BasicBuild( context.copy( projectDirectory = start ) ) with BuildBuildWithoutEssentials + new cbt.BasicBuild( context.copy( workingDirectory = start ) ) with BuildBuildWithoutEssentials else - new cbt.BasicBuild( context.copy( projectDirectory = start ) ) with BuildBuild + new cbt.BasicBuild( context.copy( workingDirectory = start ) ) with BuildBuild } catch { case e:ClassNotFoundException if e.getMessage == "Build" => throw new Exception(s"no class Build found in " ++ start.string) |