diff options
author | Christopher Vogt <oss.nsp@cvogt.org> | 2017-03-29 09:30:32 -0400 |
---|---|---|
committer | Christopher Vogt <oss.nsp@cvogt.org> | 2017-04-02 00:25:43 -0400 |
commit | e614bf22c6a4b09962e44bb20d880c1b4107df6d (patch) | |
tree | f3b8fb70e8c03de0d970f35f051cad47084b3c1e /stage2/libraries.scala | |
parent | 56c49924f4016b922801d0ab28c787240044e886 (diff) | |
download | cbt-e614bf22c6a4b09962e44bb20d880c1b4107df6d.tar.gz cbt-e614bf22c6a4b09962e44bb20d880c1b4107df6d.tar.bz2 cbt-e614bf22c6a4b09962e44bb20d880c1b4107df6d.zip |
type-safe aliases for non cbt libraries
Diffstat (limited to 'stage2/libraries.scala')
-rw-r--r-- | stage2/libraries.scala | 35 |
1 files changed, 26 insertions, 9 deletions
diff --git a/stage2/libraries.scala b/stage2/libraries.scala index ebc748d..3c4800d 100644 --- a/stage2/libraries.scala +++ b/stage2/libraries.scala @@ -7,13 +7,30 @@ class libraries( context: Context, scalaVersion: String, scalaMajorVersion: Stri ), None ) - def captureArgs = dep( "capture_args" ) - def eval = dep( "eval" ) - def file = dep( "file" ) - def proguard = dep( "proguard" ) - def reflect = dep( "reflect" ) - def common_0 = dep( "common-0" ) - def common_1 = dep( "common-1" ) - def interfaces = dep( "interfaces" ) - def scalatestRunner = dep( "scalatest-runner" ) + object cbt { + def captureArgs = dep( "capture_args" ) + def common_0 = dep( "common-0" ) + def common_1 = dep( "common-1" ) + def eval = dep( "eval" ) + def file = dep( "file" ) + def interfaces = dep( "interfaces" ) + def proguard = dep( "proguard" ) + def reflect = dep( "reflect" ) + def scalatestRunner = dep( "scalatest-runner" ) + } + object scala { + private def _maven = ( g: String, a: String, v: String ) => { + MavenResolver( + context.cbtLastModified, context.paths.mavenCache, mavenCentral + )( + context.logger, context.transientCache, context.classLoaderCache + ) bindOne MavenDependency( g, a, v ) + } + + def library = _maven( "org.scala-lang", "scala-library", scalaVersion ) + def reflect = _maven( "org.scala-lang", "scala-reflect", scalaVersion ) + def compiler = _maven( "org.scala-lang", "scala-compiler", scalaVersion ) + def xml = _maven( "org.scala-lang.modules", "scala-xml_" ++ scalaMajorVersion, "1.0.6" ) + def parserCombinators = _maven( "org.scala-lang.modules", "scala-parser-combinators_" ++ scalaMajorVersion, "1.0.5" ) + } } |