aboutsummaryrefslogtreecommitdiff
path: root/stage2/libraries.scala
diff options
context:
space:
mode:
authorJan Christopher Vogt <oss.nsp@cvogt.org>2017-04-02 03:21:42 -0400
committerGitHub <noreply@github.com>2017-04-02 03:21:42 -0400
commit2476e2ec1100813ae4e05cf2183feff8bf5ec8ea (patch)
treea334625acfe91c0233abf57a5fb7b52f040e0846 /stage2/libraries.scala
parente7112d59b811ca4a0bda448a18e0c45cb4841abb (diff)
parentc220ef8d12e77ce6af6fafde3b388fc3e334b380 (diff)
downloadcbt-2476e2ec1100813ae4e05cf2183feff8bf5ec8ea.tar.gz
cbt-2476e2ec1100813ae4e05cf2183feff8bf5ec8ea.tar.bz2
cbt-2476e2ec1100813ae4e05cf2183feff8bf5ec8ea.zip
Merge pull request #471 from cvogt/2.12-ready
2.12 ready
Diffstat (limited to 'stage2/libraries.scala')
-rw-r--r--stage2/libraries.scala37
1 files changed, 27 insertions, 10 deletions
diff --git a/stage2/libraries.scala b/stage2/libraries.scala
index f0e4ecc..3c4800d 100644
--- a/stage2/libraries.scala
+++ b/stage2/libraries.scala
@@ -1,5 +1,5 @@
package cbt
-class libraries( context: Context, scalaVersion: String ) {
+class libraries( context: Context, scalaVersion: String, scalaMajorVersion: String ) {
private def dep( name: String ) = DirectoryDependency(
context.copy(
scalaVersion = Some( scalaVersion ),
@@ -7,13 +7,30 @@ class libraries( context: Context, scalaVersion: String ) {
),
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" )
+ }
}