@@ -2,7 +2,7 @@ import sbt._
2
2
import Keys ._
3
3
import Process ._
4
4
5
- object MiniboxingBuild extends Build {
5
+ object DottyBuild extends Build {
6
6
7
7
val defaults = Defaults .defaultSettings ++ Seq (
8
8
// set sources to src/, tests to test/ and resources to resources/
@@ -31,9 +31,23 @@ object MiniboxingBuild extends Build {
31
31
// scalac options
32
32
scalacOptions in Global ++= Seq (" -feature" , " -deprecation" , " -language:_" ),
33
33
34
- // main class
35
- mainClass in (Compile , run) := Some (" dotty.tools.dotc.Main" )
34
+ // Adjust classpath for running dotty
35
+ mainClass in (Compile , run) := Some (" dotty.tools.dotc.Main" ),
36
+ fork in run := true ,
37
+ fork in Test := true ,
38
+ // http://grokbase.com/t/gg/simple-build-tool/135ke5y90p/sbt-setting-jvm-boot-paramaters-for-scala
39
+ javaOptions <++= (managedClasspath in Runtime , packageBin in Compile ) map { (attList, bin) =>
40
+ // put the Scala {library, reflect, compiler} in the classpath
41
+ val path = for {
42
+ file <- attList.map(_.data)
43
+ path = file.getAbsolutePath
44
+ } yield " -Xbootclasspath/p:" + path
45
+ // dotty itself needs to be in the bootclasspath
46
+ val self = " -Xbootclasspath/a:" + bin
47
+ System .err.println(" PATH: " + path)
48
+ self :: path.toList
49
+ }
36
50
)
37
51
38
- lazy val dotty = Project (id = " miniboxing " , base = file(" ." ), settings = defaults)
52
+ lazy val dotty = Project (id = " dotty " , base = file(" ." ), settings = defaults)
39
53
}
0 commit comments