File tree 1 file changed +10
-0
lines changed
1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -21,6 +21,8 @@ import dotty.tools.sbtplugin.DottyIDEPlugin.autoImport._
21
21
import sbtbuildinfo .BuildInfoPlugin
22
22
import sbtbuildinfo .BuildInfoPlugin .autoImport ._
23
23
24
+ import scala .util .Properties .isJavaAtLeast
25
+
24
26
/* In sbt 0.13 the Build trait would expose all vals to the shell, where you
25
27
* can use them in "set a := b" like expressions. This re-exposes them.
26
28
*/
@@ -225,6 +227,14 @@ object Build {
225
227
// non-bootstrapped dotty-library that will then take priority over
226
228
// the bootstrapped dotty-library on the classpath or sourcepath.
227
229
classpathOptions ~= (_.withAutoBoot(false )),
230
+ // ... but when running under Java 8, we still need a Scala bootclasspath that contains the JVM bootclasspath,
231
+ // otherwise sbt incremental compilation breaks.
232
+ scalacOptions ++= {
233
+ if (isJavaAtLeast(" 9" ))
234
+ Seq ()
235
+ else
236
+ Seq (" -bootclasspath" , sys.props(" sun.boot.class.path" ))
237
+ },
228
238
229
239
// Enforce that the only Scala 2 classfiles we unpickle come from scala-library
230
240
/*
You can’t perform that action at this time.
0 commit comments