diff options
author | Felix Mulder <felix.mulder@gmail.com> | 2016-06-07 17:36:35 +0200 |
---|---|---|
committer | Felix Mulder <felix.mulder@gmail.com> | 2016-06-07 17:36:35 +0200 |
commit | 002ed8e1ccaf6e821c75da3a4bfad3b3c12da0ab (patch) | |
tree | 760c6a0867f8b8911b99e0f14dd2cca492aebced /project/Build.scala | |
parent | 9baa9728b5eb6d679c113403a6a1b0e574174174 (diff) | |
parent | 09b2f39731386cd5b3688d5c3badf75d956d4f6d (diff) | |
download | dotty-002ed8e1ccaf6e821c75da3a4bfad3b3c12da0ab.tar.gz dotty-002ed8e1ccaf6e821c75da3a4bfad3b3c12da0ab.tar.bz2 dotty-002ed8e1ccaf6e821c75da3a4bfad3b3c12da0ab.zip |
Merge pull request #1306 from dotty-staging/add/dotty-bridge
Merge the sbt compiler bridge as a subproject of dotty
Diffstat (limited to 'project/Build.scala')
-rw-r--r-- | project/Build.scala | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/project/Build.scala b/project/Build.scala index 71fb4c142..db3587772 100644 --- a/project/Build.scala +++ b/project/Build.scala @@ -195,6 +195,58 @@ object DottyBuild extends Build { ). settings(publishing) + lazy val `dotty-bridge` = project.in(file("bridge")). + dependsOn(dotty). + settings( + overrideScalaVersionSetting, + + description := "sbt compiler bridge for Dotty", + resolvers += Resolver.typesafeIvyRepo("releases"), + libraryDependencies ++= Seq( + "org.scala-sbt" % "interface" % sbtVersion.value, + "org.scala-sbt" % "api" % sbtVersion.value % "test", + "org.specs2" %% "specs2" % "2.3.11" % "test" + ), + version := "0.1.1-SNAPSHOT", + // The sources should be published with crossPaths := false, the binaries + // are unused so it doesn't matter. + crossPaths := false, + + fork in Test := true, + parallelExecution in Test := false + ). + settings(ScriptedPlugin.scriptedSettings: _*). + settings( + ScriptedPlugin.scriptedLaunchOpts := Seq("-Xmx1024m"), + ScriptedPlugin.scriptedBufferLog := false + // TODO: Use this instead of manually copying DottyInjectedPlugin.scala + // everywhere once https://github.com/sbt/sbt/issues/2601 gets fixed. + /*, + ScriptedPlugin.scriptedPrescripted := { f => + IO.write(inj, """ +import sbt._ +import Keys._ + +object DottyInjectedPlugin extends AutoPlugin { + override def requires = plugins.JvmPlugin + override def trigger = allRequirements + + override val projectSettings = Seq( + scalaVersion := "0.1-SNAPSHOT", + scalaOrganization := "ch.epfl.lamp", + scalacOptions += "-language:Scala2", + scalaBinaryVersion := "2.11", + autoScalaLibrary := false, + libraryDependencies ++= Seq("org.scala-lang" % "scala-library" % "2.11.5"), + scalaCompilerBridgeSource := ("ch.epfl.lamp" % "dotty-bridge" % "0.1.1-SNAPSHOT" % "component").sources() + ) +} +""") + } + */ + ) + + /** A sandbox to play with the Scala.js back-end of dotty. * * This sandbox is compiled with dotty with support for Scala.js. It can be |