diff options
author | Christopher Vogt <oss.nsp@cvogt.org> | 2016-11-29 03:11:50 +0000 |
---|---|---|
committer | Christopher Vogt <oss.nsp@cvogt.org> | 2017-02-09 23:37:26 -0500 |
commit | 82cad73d1e88ba9ea4667c3f7840ce66032e576e (patch) | |
tree | 6865d6bde47c0d4e0a9331a1f27a2187af71a897 /stage2/plugins/Dotty.scala | |
parent | c293f196d8555fa446b1276eb21857093a7ccefd (diff) | |
download | cbt-82cad73d1e88ba9ea4667c3f7840ce66032e576e.tar.gz cbt-82cad73d1e88ba9ea4667c3f7840ce66032e576e.tar.bz2 cbt-82cad73d1e88ba9ea4667c3f7840ce66032e576e.zip |
Support custom Dotty compiler
Diffstat (limited to 'stage2/plugins/Dotty.scala')
-rw-r--r-- | stage2/plugins/Dotty.scala | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/stage2/plugins/Dotty.scala b/stage2/plugins/Dotty.scala index 6fe5dd3..d20f3ea 100644 --- a/stage2/plugins/Dotty.scala +++ b/stage2/plugins/Dotty.scala @@ -9,9 +9,13 @@ trait Dotty extends BaseBuild{ def dottyOptions: Seq[String] = Seq() override def scalaTarget: File = target ++ s"/dotty-$dottyVersion" + def dottyDependency: DependencyImplementation = Resolver(mavenCentral).bindOne( + MavenDependency("ch.epfl.lamp","dotty_2.11",dottyVersion) + ) + private lazy val dottyLib = new DottyLib( logger, context.cbtLastModified, context.paths.mavenCache, - context.classLoaderCache, dottyVersion = dottyVersion + context.classLoaderCache, dottyDependency ) override def compile: Option[Long] = taskCache[Dotty]("compile").memoize{ @@ -27,7 +31,7 @@ trait Dotty extends BaseBuild{ override def repl = dottyLib.repl(context.args, classpath) - override def dependencies = Resolver(mavenCentral).bind( + override def dependencies: Seq[Dependency] = Resolver(mavenCentral).bind( ScalaDependency( "org.scala-lang.modules", "scala-java8-compat", "0.8.0-RC7" ) ) } @@ -37,15 +41,12 @@ class DottyLib( cbtLastModified: Long, mavenCache: File, classLoaderCache: ClassLoaderCache, - dottyVersion: String + dottyDependency: DependencyImplementation )(implicit transientCache: java.util.Map[AnyRef,AnyRef]){ val lib = new Lib(logger) import lib._ private def Resolver(urls: URL*) = MavenResolver(cbtLastModified, mavenCache, urls: _*) - private lazy val dottyDependency = Resolver(mavenCentral).bindOne( - MavenDependency("ch.epfl.lamp","dotty_2.11",dottyVersion) - ) def repl(args: Seq[String], classpath: ClassPath) = { consoleOrFail("Use `cbt direct repl` instead") |