diff options
author | Christopher Vogt <oss.nsp@cvogt.org> | 2017-02-15 03:30:46 -0500 |
---|---|---|
committer | Christopher Vogt <oss.nsp@cvogt.org> | 2017-02-15 04:07:21 -0500 |
commit | 4f4c34f3f52b87057626682dd43a21cd83e2ff7a (patch) | |
tree | 12396906bde5f51cc8fc274c387d77e438bd2c23 /stage2/Scaffold.scala | |
parent | 7ee113962134e3c9c4659d6de9de3c7015174d3f (diff) | |
download | cbt-4f4c34f3f52b87057626682dd43a21cd83e2ff7a.tar.gz cbt-4f4c34f3f52b87057626682dd43a21cd83e2ff7a.tar.bz2 cbt-4f4c34f3f52b87057626682dd43a21cd83e2ff7a.zip |
add package to generated Build in build.scala and in-package discovery
This should allow for build to add other builds to their dependencies
and interact with them in a type-safe way. And ever regardless it seems
like good practice to never have the same class existing in the same
package or the top-level package even if they don’t end up on the same
classpath. This might also help make stack traces easier to understand.
Also improve error messages for mistakes with the build class, e.g.
constructor, super classes, etc.
Diffstat (limited to 'stage2/Scaffold.scala')
-rw-r--r-- | stage2/Scaffold.scala | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/stage2/Scaffold.scala b/stage2/Scaffold.scala index b110258..68a966b 100644 --- a/stage2/Scaffold.scala +++ b/stage2/Scaffold.scala @@ -59,7 +59,8 @@ object Main{ def createBuild( projectDirectory: File ): Unit = { - createFile(projectDirectory, "build/build.scala", s"""import cbt._ + createFile(projectDirectory, lib.buildDirectoryName++"/"++lib.buildFileName, s"""package cbt_build.${packageFromDirectory(projectDirectory)} +import cbt._ class Build(val context: Context) extends BaseBuild{ override def dependencies = super.dependencies ++ // don't forget super.dependencies here for scala-library, etc. |