summaryrefslogtreecommitdiff
path: root/build.sbt
diff options
context:
space:
mode:
authorLi Haoyi <haoyi.sg@gmail.com>2018-02-02 20:15:00 -0800
committerLi Haoyi <haoyi.sg@gmail.com>2018-02-02 20:21:37 -0800
commit2e50c963eecadcf7bd6ecd6956584ab099d5273a (patch)
tree2f66db3102be7b958cf56429c6dd60c2ae610766 /build.sbt
parent4d79af93f907264a16abe3661ea417a268b0ef67 (diff)
downloadmill-2e50c963eecadcf7bd6ecd6956584ab099d5273a.tar.gz
mill-2e50c963eecadcf7bd6ecd6956584ab099d5273a.tar.bz2
mill-2e50c963eecadcf7bd6ecd6956584ab099d5273a.zip
compile zinc compiler bridges on demand to remove restriction on supported scala versions
Diffstat (limited to 'build.sbt')
-rw-r--r--build.sbt71
1 files changed, 30 insertions, 41 deletions
diff --git a/build.sbt b/build.sbt
index c3be03d9..c1e72ae9 100644
--- a/build.sbt
+++ b/build.sbt
@@ -64,36 +64,36 @@ def ammoniteRun(hole: SettingKey[File], args: String => List[String], suffix: St
}
-def bridge(bridgeVersion: String) = Project(
- id = "bridge" + bridgeVersion.replace('.', '_'),
- base = file("target/bridge/" + bridgeVersion.replace('.', '_')),
- settings = Seq(
- organization := "com.lihaoyi",
- scalaVersion := bridgeVersion,
- name := "mill-bridge",
- target := baseDirectory.value,
- crossVersion := CrossVersion.full,
- libraryDependencies ++= Seq(
- "org.scala-lang" % "scala-compiler" % scalaVersion.value,
- "org.scala-sbt" % "compiler-interface" % "1.0.5"
- ),
- (sourceGenerators in Compile) += ammoniteRun(
- sourceManaged in Compile,
- List("shared.sc", "downloadBridgeSource", _, bridgeVersion)
- ).taskValue.map(x => (x ** "*.scala").get)
- )
-)
-
-lazy val bridge2_10_6 = bridge("2.10.6")
-lazy val bridge2_11_8 = bridge("2.11.8")
-//lazy val bridge2_11_9 = bridge("2.11.9")
-//lazy val bridge2_11_10 = bridge("2.11.10")
-lazy val bridge2_11_11 = bridge("2.11.11")
-//lazy val bridge2_12_0 = bridge("2.12.0")
-//lazy val bridge2_12_1 = bridge("2.12.1")
-//lazy val bridge2_12_2 = bridge("2.12.2")
-lazy val bridge2_12_3 = bridge("2.12.3")
-lazy val bridge2_12_4 = bridge("2.12.4")
+//def bridge(bridgeVersion: String) = Project(
+// id = "bridge" + bridgeVersion.replace('.', '_'),
+// base = file("target/bridge/" + bridgeVersion.replace('.', '_')),
+// settings = Seq(
+// organization := "com.lihaoyi",
+// scalaVersion := bridgeVersion,
+// name := "mill-bridge",
+// target := baseDirectory.value,
+// crossVersion := CrossVersion.full,
+// libraryDependencies ++= Seq(
+// "org.scala-lang" % "scala-compiler" % scalaVersion.value,
+// "org.scala-sbt" % "compiler-interface" % "1.0.5"
+// ),
+// (sourceGenerators in Compile) += ammoniteRun(
+// sourceManaged in Compile,
+// List("shared.sc", "downloadBridgeSource", _, bridgeVersion)
+// ).taskValue.map(x => (x ** "*.scala").get)
+// )
+//)
+//
+//lazy val bridge2_10_6 = bridge("2.10.6")
+//lazy val bridge2_11_8 = bridge("2.11.8")
+////lazy val bridge2_11_9 = bridge("2.11.9")
+////lazy val bridge2_11_10 = bridge("2.11.10")
+//lazy val bridge2_11_11 = bridge("2.11.11")
+////lazy val bridge2_12_0 = bridge("2.12.0")
+////lazy val bridge2_12_1 = bridge("2.12.1")
+////lazy val bridge2_12_2 = bridge("2.12.2")
+//lazy val bridge2_12_3 = bridge("2.12.3")
+//lazy val bridge2_12_4 = bridge("2.12.4")
lazy val core = project
.dependsOn(moduledefs)
@@ -131,16 +131,6 @@ lazy val moduledefs = project
publishArtifact in Compile := false
)
-val bridgeProps = Def.task{
- val mapping = Map(
- "MILL_COMPILER_BRIDGE_2_10_6" -> (packageBin in (bridge2_10_6, Compile)).value.absolutePath,
- "MILL_COMPILER_BRIDGE_2_11_8" -> (packageBin in (bridge2_11_8, Compile)).value.absolutePath,
- "MILL_COMPILER_BRIDGE_2_11_11" -> (packageBin in (bridge2_11_11, Compile)).value.absolutePath,
- "MILL_COMPILER_BRIDGE_2_12_3" -> (packageBin in (bridge2_12_3, Compile)).value.absolutePath,
- "MILL_COMPILER_BRIDGE_2_12_4" -> (packageBin in (bridge2_12_4, Compile)).value.absolutePath
- )
- for((k, v) <- mapping) yield s"-D$k=$v"
-}
lazy val scalaWorkerProps = Def.task{
Seq("-DMILL_SCALA_WORKER=" + (fullClasspath in (scalaworker, Compile)).value.map(_.data).mkString(","))
}
@@ -176,7 +166,6 @@ def genTask(m: Project) = Def.task{
}
(javaOptions in scalalib) := {
- bridgeProps.value.toSeq ++
scalaWorkerProps.value ++
Seq("-DMILL_BUILD_LIBRARIES=" +
(