aboutsummaryrefslogtreecommitdiff
path: root/stage2
diff options
context:
space:
mode:
authorJan Christopher Vogt <oss.nsp@cvogt.org>2017-02-10 01:12:02 -0500
committerGitHub <noreply@github.com>2017-02-10 01:12:02 -0500
commit7be47a9a4e796fd01861ee5bb41fce0e3d56636b (patch)
tree5b49b8d995d7565087a49d643414285a67f83894 /stage2
parentd743136c6b98fa91f501cc15dc47530f8f93b8fe (diff)
parent82cad73d1e88ba9ea4667c3f7840ce66032e576e (diff)
downloadcbt-7be47a9a4e796fd01861ee5bb41fce0e3d56636b.tar.gz
cbt-7be47a9a4e796fd01861ee5bb41fce0e3d56636b.tar.bz2
cbt-7be47a9a4e796fd01861ee5bb41fce0e3d56636b.zip
Merge pull request #333 from cvogt/custom-dotty
Support custom Dotty compiler
Diffstat (limited to 'stage2')
-rw-r--r--stage2/plugins/Dotty.scala13
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")