diff options
-rw-r--r-- | stage2/AdminTasks.scala | 1 | ||||
-rw-r--r-- | stage2/Scaffold.scala | 35 |
2 files changed, 25 insertions, 11 deletions
diff --git a/stage2/AdminTasks.scala b/stage2/AdminTasks.scala index 069b712..a61e767 100644 --- a/stage2/AdminTasks.scala +++ b/stage2/AdminTasks.scala @@ -40,6 +40,7 @@ class AdminTasks(lib: Lib, args: Seq[String], cwd: File){ ) } def scaffoldBasicBuild: Unit = lib.scaffoldBasicBuild( cwd ) + def scaffoldBuildBuild: Unit = lib.scaffoldBuildBuild( cwd ) def cbtEarlyDependencies = { val scalaVersion = args.lift(1).getOrElse(constants.scalaVersion) val scalaMajorVersion = scalaVersion.split("\\.").take(2).mkString(".") diff --git a/stage2/Scaffold.scala b/stage2/Scaffold.scala index 3dcb9ae..7806b8c 100644 --- a/stage2/Scaffold.scala +++ b/stage2/Scaffold.scala @@ -16,13 +16,6 @@ trait Scaffold{ def scaffoldBasicBuild( projectDirectory: File ): Unit = { - /** - TODO: - - make behavior more user friendly: - - not generate half and then throw exception for one thing already existing - - maybe not generate all of this, e.g. offer different variants - */ - createFile(projectDirectory, "build/build.scala", s"""import cbt._ import java.net.URL import java.io.File @@ -33,7 +26,30 @@ class Build(context: Context) extends BasicBuild(context){ // "org.cvogt" %% "scala-extensions" % "0.4.1" ) } -"""/*, +""" + ) + + } + + def scaffoldBuildBuild( + projectDirectory: File + ): Unit = { + createFile(projectDirectory, "build/build/build.scala", s"""import cbt._ +import java.net.URL +import java.io.File +import scala.collection.immutable.Seq + +class Build(context: Context) extends BuildBuild(context){ + override def dependencies = super.dependencies ++ Seq( + // , "com.lihaoyi" %% "ammonite-ops" % "0.5.5" + ) +} +""" + ) + + } + +/*, "build/build/build.scala" -> s"""import cbt._ import java.net.URL @@ -120,8 +136,5 @@ trait BuildShared extends BasicBuild{ override def pomExtra: Seq[scala.xml.Node] = Seq() } """*/ - ) - - } }
\ No newline at end of file |