From 137924b53de8429a5f8d899d08b5710868f2d4c3 Mon Sep 17 00:00:00 2001 From: Christopher Vogt Date: Tue, 3 May 2016 11:18:21 +0300 Subject: improve build file templates --- stage2/Scaffold.scala | 46 ++++++++++++++++++++++++++++------------------ 1 file changed, 28 insertions(+), 18 deletions(-) diff --git a/stage2/Scaffold.scala b/stage2/Scaffold.scala index 7ad0146..a9db667 100644 --- a/stage2/Scaffold.scala +++ b/stage2/Scaffold.scala @@ -34,20 +34,25 @@ import java.io.File import scala.collection.immutable.Seq class Build( context: Context ) extends BasicBuild( context ){ - override def dependencies = { // don't forget super.dependencies here - super.dependencies ++ Resolver( mavenCentral ).bind( - /* - // Scala dependency automatically adding Scala major version to artifact id + /* + override def dependencies = ( + super.dependencies // don't forget super.dependencies here + ++ + Resolver( mavenCentral ).bind( + // automatically add Scala major version to artifact id + // CBT-style Scala dependency ScalaDependency( "com.lihaoyi", "ammonite-ops", "0.5.5" ) - // SBT-style Scala dependency + // or SBT-style Scala dependency "com.lihaoyi" %% "ammonite-ops" % "0.5.5" - // Java dependency directly corresponding to maven artifact id + + // don't mess with the artifact id + // CBT-Style Java dependency MavenDependency( "com.lihaoyi", "ammonite-ops_2.11", "0.5.5" ) - // SBT-style Java dependency + // or SBT-style Java dependency "com.lihaoyi" % "ammonite-ops_2.11" % "0.5.5" - */ ) - } + ) + */ } """ ) @@ -62,20 +67,25 @@ import java.io.File import scala.collection.immutable.Seq class Build( context: Context ) extends BuildBuild( context ){ - override def dependencies = { // don't forget super.dependencies here - super.dependencies ++ Resolver( mavenCentral ).bind( - /* - // Scala dependency automatically adding Scala major version to artifact id +/* + override def dependencies = ( + super.dependencies // don't forget super.dependencies here + ++ + Resolver( mavenCentral ).bind( + // automatically add Scala major version to artifact id + // CBT-style Scala dependency ScalaDependency( "com.lihaoyi", "ammonite-ops", "0.5.5" ) - // SBT-style Scala dependency + // or SBT-style Scala dependency "com.lihaoyi" %% "ammonite-ops" % "0.5.5" - // Java dependency directly corresponding to maven artifact id + + // don't mess with the artifact id + // CBT-Style Java dependency MavenDependency( "com.lihaoyi", "ammonite-ops_2.11", "0.5.5" ) - // SBT-style Java dependency + // or SBT-style Java dependency "com.lihaoyi" % "ammonite-ops_2.11" % "0.5.5" - */ ) - } + ) + */ } """ ) -- cgit v1.2.3