diff options
author | Li Haoyi <haoyi.sg@gmail.com> | 2018-01-23 01:38:20 -0800 |
---|---|---|
committer | Li Haoyi <haoyi.sg@gmail.com> | 2018-01-23 01:50:56 -0800 |
commit | 0ea8b3d10ae7500426b174a33ef70d03d474ecc4 (patch) | |
tree | ee18b2e3605dd3c71c0d00d9eed7383b4a38529c /build.sbt | |
parent | 4a0658da074bc7b7df0c5bdff90e2c6bb1977b15 (diff) | |
download | mill-0ea8b3d10ae7500426b174a33ef70d03d474ecc4.tar.gz mill-0ea8b3d10ae7500426b174a33ef70d03d474ecc4.tar.bz2 mill-0ea8b3d10ae7500426b174a33ef70d03d474ecc4.zip |
WIP splitting `mill.scalaworker` out of `mill.scalalib` and into it's own isolated module/classloader. Most scalalib test pass, tho GenIdea is still broken
Diffstat (limited to 'build.sbt')
-rw-r--r-- | build.sbt | 33 |
1 files changed, 26 insertions, 7 deletions
@@ -28,7 +28,6 @@ val sharedSettings = Seq( mainClass in Test := Some("ammonite.Main") ) - val pluginSettings = Seq( scalacOptions in Test ++= { val jarFile = (packageBin in (moduledefs, Compile)).value @@ -106,9 +105,7 @@ lazy val core = project "org.scala-lang" % "scala-reflect" % scalaVersion.value % "provided", "com.lihaoyi" %% "sourcecode" % "0.1.4", "com.lihaoyi" %% "pprint" % "0.5.3", - "com.lihaoyi" % "ammonite" % "1.0.3-21-05b5d32" cross CrossVersion.full, - "org.scala-sbt" %% "zinc" % "1.0.5", - "org.scala-sbt" % "test-interface" % "1.0" + "com.lihaoyi" % "ammonite" % "1.0.3-21-05b5d32" cross CrossVersion.full ), sourceGenerators in Compile += { ammoniteRun(sourceManaged in Compile, List("shared.sc", "generateCoreSources", _)) @@ -143,6 +140,9 @@ val bridgeProps = Def.task{ ) 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(",")) +} lazy val scalalib = project .dependsOn(core % "compile->compile;test->test") @@ -151,9 +151,24 @@ lazy val scalalib = project pluginSettings, name := "mill-scalalib", fork := true, - baseDirectory in Test := (baseDirectory in Test).value / "..", - javaOptions := bridgeProps.value.toSeq + baseDirectory in Test := (baseDirectory in Test).value / ".." + ) + +lazy val scalaworker: Project = project + .dependsOn(core, scalalib) + .settings( + sharedSettings, + pluginSettings, + name := "mill-scalaworker", + fork := true, + libraryDependencies ++= Seq( + "org.scala-sbt" %% "zinc" % "1.0.5", + "org.scala-sbt" % "test-interface" % "1.0" + ) ) + +(javaOptions in scalalib) := bridgeProps.value.toSeq ++ scalaWorkerProps.value + lazy val scalajslib = project .dependsOn(scalalib % "compile->compile;test->test") .settings( @@ -247,7 +262,11 @@ lazy val bin = project mainClass in (Test, run) := Some("mill.Main"), baseDirectory in (Test, run) := (baseDirectory in (Compile, run)).value / ".." / "..", assemblyOption in assembly := { - val extraArgs = (bridgeProps.value ++ jsbridgeProps.value).mkString(" ") + val extraArgs = ( + bridgeProps.value ++ + jsbridgeProps.value ++ + scalaWorkerProps.value + ).mkString(" ") (assemblyOption in assembly).value.copy( prependShellScript = Some( Seq( |