diff options
author | Vlad Ureche <vlad.ureche@gmail.com> | 2014-01-23 22:52:59 +0100 |
---|---|---|
committer | Vlad Ureche <vlad.ureche@gmail.com> | 2014-01-23 23:00:06 +0100 |
commit | 80209dd9aea9cb922200aefc9b6afc650ba35db8 (patch) | |
tree | 42804cadb648d8feb7ecb7dc50fbc09d9fcdfd3c /project | |
parent | e41f4fdd0efd9b19d5363def8ecb057fc6326d57 (diff) | |
download | dotty-80209dd9aea9cb922200aefc9b6afc650ba35db8.tar.gz dotty-80209dd9aea9cb922200aefc9b6afc650ba35db8.tar.bz2 dotty-80209dd9aea9cb922200aefc9b6afc650ba35db8.zip |
Fix (run, Test) classpath issues
Diffstat (limited to 'project')
-rw-r--r-- | project/Build.scala | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/project/Build.scala b/project/Build.scala index 2453d0057..ecf000832 100644 --- a/project/Build.scala +++ b/project/Build.scala @@ -2,7 +2,7 @@ import sbt._ import Keys._ import Process._ -object MiniboxingBuild extends Build { +object DottyBuild extends Build { val defaults = Defaults.defaultSettings ++ Seq( // set sources to src/, tests to test/ and resources to resources/ @@ -31,9 +31,23 @@ object MiniboxingBuild extends Build { // scalac options scalacOptions in Global ++= Seq("-feature", "-deprecation", "-language:_"), - // main class - mainClass in (Compile, run) := Some("dotty.tools.dotc.Main") + // Adjust classpath for running dotty + mainClass in (Compile, run) := Some("dotty.tools.dotc.Main"), + fork in run := true, + fork in Test := true, + // http://grokbase.com/t/gg/simple-build-tool/135ke5y90p/sbt-setting-jvm-boot-paramaters-for-scala + javaOptions <++= (managedClasspath in Runtime, packageBin in Compile) map { (attList, bin) => + // put the Scala {library, reflect, compiler} in the classpath + val path = for { + file <- attList.map(_.data) + path = file.getAbsolutePath + } yield "-Xbootclasspath/p:" + path + // dotty itself needs to be in the bootclasspath + val self = "-Xbootclasspath/a:" + bin + System.err.println("PATH: " + path) + self :: path.toList + } ) - lazy val dotty = Project(id = "miniboxing", base = file("."), settings = defaults) + lazy val dotty = Project(id = "dotty", base = file("."), settings = defaults) } |