aboutsummaryrefslogtreecommitdiff
path: root/project
diff options
context:
space:
mode:
authorGuillaume Martres <smarter@ubuntu.com>2016-05-31 15:23:04 +0200
committerFelix Mulder <felix.mulder@gmail.com>2016-06-07 17:10:36 +0200
commit09b2f39731386cd5b3688d5c3badf75d956d4f6d (patch)
treed122fc0e96d6c1cd22d7e0d0b5ee523563d534e7 /project
parent030ff82070197f0c126f5c0287e076b0f6b6dd8d (diff)
downloaddotty-09b2f39731386cd5b3688d5c3badf75d956d4f6d.tar.gz
dotty-09b2f39731386cd5b3688d5c3badf75d956d4f6d.tar.bz2
dotty-09b2f39731386cd5b3688d5c3badf75d956d4f6d.zip
Make the dotty-bridge sbt project a subproject of dotty
Note that the dotty-bridge tests will not be run automatically by `test` which is short for `dotty/test`, to run the dotty-bridge tests, do in sbt: > dotty-bridge/test > dotty-bridge/scripted Original history: https://github.com/smarter/dotty-bridge/commits/master
Diffstat (limited to 'project')
-rw-r--r--project/Build.scala52
-rw-r--r--project/scripted.sbt2
2 files changed, 54 insertions, 0 deletions
diff --git a/project/Build.scala b/project/Build.scala
index c753d3779..7a140534f 100644
--- a/project/Build.scala
+++ b/project/Build.scala
@@ -194,6 +194,58 @@ object DottyBuild extends Build {
addCommandAlias("partest-only-no-bootstrap", ";test:package;package; lockPartestFile;test:test-only dotc.tests;runPartestRunner")
)
+ 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
diff --git a/project/scripted.sbt b/project/scripted.sbt
new file mode 100644
index 000000000..76fdf267f
--- /dev/null
+++ b/project/scripted.sbt
@@ -0,0 +1,2 @@
+// Used by the subproject dotty-bridge
+libraryDependencies += "org.scala-sbt" % "scripted-plugin" % sbtVersion.value