Skip to content

Commit

Permalink
Rename build/ to build.cbt/
Browse files Browse the repository at this point in the history
  • Loading branch information
tim-zh committed Oct 14, 2016
1 parent 704d408 commit 823ef0c
Show file tree
Hide file tree
Showing 49 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -148,16 +148,16 @@ CBT can help you with that. Execute:
$ cbt tools createBuild
```

Now there should be a file `build/Build.scala` with a sample `Build` class.
Now there should be a file `build.cbt/Build.scala` with a sample `Build` class.

Btw., a build file can have it's own build and so on recursively like in SBT.
When you create a file `build/build/Build.scala` and change `Build` class in there
to extend `BuildBuild`, it will be used to build your `build/Build.scala`. You can
When you create a file `build.cbt/build.cbt/Build.scala` and change `Build` class in there
to extend `BuildBuild`, it will be used to build your `build.cbt/Build.scala`. You can
add built-time dependencies like plugins this way.

### Adding dependencies

In the generated `build/Build.scala` there are
In the generated `build.cbt/Build.scala` there are
several examples for dependencies. We recommend using the constructor syntax
`ScalaDependency` (for automatically adding the scala version to the artifact id)
or `MavenDependency` (for leaving the artifact id as is). The SBT-Style `%`-DSL
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion stage2/BuildBuild.scala
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ trait BuildBuild extends BaseBuild{
} else {
throw new Exception("No file Build.scala (upper case) found in " ++ projectDirectory.getPath)
}
} else if (projectDirectory.getParentFile.getName == "build") {
} else if (projectDirectory.getParentFile.getName == "build.cbt") {
new BasicBuild(managedContext) with BuildBuild
} else {
new BasicBuild(managedContext)
Expand Down
2 changes: 1 addition & 1 deletion stage2/Lib.scala
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ final class Lib(logger: Logger) extends Stage1Lib(logger) with Scaffold{
def loadRoot(context: Context, default: Context => BuildInterface = new BasicBuild(_)): BuildInterface = {
context.logger.composition( context.logger.showInvocation("Build.loadRoot",context.projectDirectory) )
def findStartDir(projectDirectory: File): File = {
val buildDir = realpath( projectDirectory ++ "/build" )
val buildDir = realpath( projectDirectory ++ "/build.cbt" )
if(buildDir.exists) findStartDir(buildDir) else projectDirectory
}

Expand Down
2 changes: 1 addition & 1 deletion stage2/Scaffold.scala
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ trait Scaffold{
def createBuild(
projectDirectory: File
): Unit = {
createFile(projectDirectory, "build/Build.scala", s"""import cbt._
createFile(projectDirectory, "build.cbt/Build.scala", s"""import cbt._
class Build(val context: Context) extends BaseBuild{
override def dependencies =
super.dependencies ++ // don't forget super.dependencies here for scala-library, etc.
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 823ef0c

Please sign in to comment.