diff options
author | Christopher Vogt <oss.nsp@cvogt.org> | 2017-03-29 09:02:09 -0400 |
---|---|---|
committer | Christopher Vogt <oss.nsp@cvogt.org> | 2017-04-01 23:36:33 -0400 |
commit | f570ad5ac5461acb7dc07a3a8654fdd54e645bb3 (patch) | |
tree | b3c7b8569d5081b44192313ad264146dbb4a069a | |
parent | e7944bfbc61b56d3a8c70550897d8e3c34f3eab3 (diff) | |
download | cbt-f570ad5ac5461acb7dc07a3a8654fdd54e645bb3.tar.gz cbt-f570ad5ac5461acb7dc07a3a8654fdd54e645bb3.tar.bz2 cbt-f570ad5ac5461acb7dc07a3a8654fdd54e645bb3.zip |
type-safe aliases for ports
-rw-r--r-- | build/build.scala | 3 | ||||
-rw-r--r-- | stage2/BasicBuild.scala | 3 | ||||
-rw-r--r-- | stage2/ports.scala | 8 |
3 files changed, 12 insertions, 2 deletions
diff --git a/build/build.scala b/build/build.scala index e077343..3873d4f 100644 --- a/build/build.scala +++ b/build/build.scala @@ -25,7 +25,8 @@ class Build(val context: Context) extends Shared with Scalariform with PublishLo context.cbtHome / "stage2" / "DirectoryDependency.scala", context.cbtHome / "stage2" / "LazyDependency.scala", context.cbtHome / "stage2" / "libraries.scala", - context.cbtHome / "stage2" / "plugins.scala" + context.cbtHome / "stage2" / "plugins.scala", + context.cbtHome / "stage2" / "ports.scala" ) ) diff --git a/stage2/BasicBuild.scala b/stage2/BasicBuild.scala index 88922d9..02c3057 100644 --- a/stage2/BasicBuild.scala +++ b/stage2/BasicBuild.scala @@ -20,7 +20,8 @@ trait BaseBuild extends BuildInterface with DependencyImplementation with SbtDep override lazy val moduleKey: String = "BaseBuild("+target.string+")" implicit def transientCache: java.util.Map[AnyRef,AnyRef] = context.transientCache - implicit def libraries(implicit context: Context): libraries = new libraries(context, scalaVersion) + object libraries extends libraries( context, scalaVersion ) + object ports extends ports(context) // library available to builds implicit protected final val logger: Logger = context.logger diff --git a/stage2/ports.scala b/stage2/ports.scala new file mode 100644 index 0000000..51ae4f0 --- /dev/null +++ b/stage2/ports.scala @@ -0,0 +1,8 @@ +package cbt +class ports( context: Context ) { + private def dep( name: String ) = DirectoryDependency( + context.copy( workingDirectory = context.cbtHome / "ports" / name ), + None + ) + def mima = dep( "migration-manager" ) +} |