@@ -114,6 +114,8 @@ object Build {
114
114
// currently refers to dotty in its scripted task and "aggregate" does not take by-name
115
115
// parameters: https://github.com/sbt/sbt/issues/2200
116
116
lazy val dottySbtBridgeRef = LocalProject (" dotty-sbt-bridge" )
117
+ // Same thing for the bootstrapped version
118
+ lazy val dottySbtBridgeBootstrappedRef = LocalProject (" dotty-sbt-bridge-bootstrapped" )
117
119
118
120
// The root project:
119
121
// - aggregates other projects so that "compile", "test", etc are run on all projects at once.
@@ -135,7 +137,8 @@ object Build {
135
137
136
138
// Meta project aggregating all bootstrapped projects
137
139
lazy val `dotty-bootstrapped` = project.
138
- aggregate(`dotty-library-bootstrapped`, `dotty-compiler-bootstrapped`, `dotty-doc-bootstrapped`).
140
+ aggregate(`dotty-library-bootstrapped`, `dotty-compiler-bootstrapped`, `dotty-doc-bootstrapped`,
141
+ dottySbtBridgeBootstrappedRef).
139
142
settings(commonSettings).
140
143
settings(
141
144
publishArtifact := false
@@ -549,44 +552,46 @@ object Build {
549
552
// until sbt/sbt#2402 is fixed (https://github.com/sbt/sbt/issues/2402)
550
553
lazy val cleanSbtBridge = TaskKey [Unit ](" cleanSbtBridge" , " delete dotty-sbt-bridge cache" )
551
554
552
- lazy val `dotty-sbt-bridge` = project.in(file(" sbt-bridge" )).
553
- dependsOn(`dotty-compiler`).
554
- settings(commonSettings).
555
- settings(
556
- cleanSbtBridge := {
557
- val dottySbtBridgeVersion = version.value
558
- val dottyVersion = (version in `dotty-compiler`).value
559
- val classVersion = System .getProperty(" java.class.version" )
560
-
561
- val sbtV = sbtVersion.value
562
- val sbtOrg = " org.scala-sbt"
563
- val sbtScalaVersion = " 2.10.6"
564
-
565
- val home = System .getProperty(" user.home" )
566
- val org = organization.value
567
- val artifact = moduleName.value
555
+ lazy val dottySbtBridgeSettings = Seq (
556
+ cleanSbtBridge := {
557
+ val dottySbtBridgeVersion = version.value
558
+ val dottyVersion = (version in `dotty-compiler`).value
559
+ val classVersion = System .getProperty(" java.class.version" )
560
+
561
+ val sbtV = sbtVersion.value
562
+ val sbtOrg = " org.scala-sbt"
563
+ val sbtScalaVersion = " 2.10.6"
564
+
565
+ val home = System .getProperty(" user.home" )
566
+ val org = organization.value
567
+ val artifact = moduleName.value
568
+
569
+ IO .delete(file(home) / " .ivy2" / " cache" / sbtOrg / s " $org- $artifact- $dottySbtBridgeVersion-bin_ ${dottyVersion}__ $classVersion" )
570
+ IO .delete(file(home) / " .sbt" / " boot" / s " scala- $sbtScalaVersion" / sbtOrg / " sbt" / sbtV / s " $org- $artifact- $dottySbtBridgeVersion-bin_ ${dottyVersion}__ $classVersion" )
571
+ },
572
+ publishLocal := (publishLocal.dependsOn(cleanSbtBridge)).value,
573
+ description := " sbt compiler bridge for Dotty" ,
574
+ resolvers += Resolver .typesafeIvyRepo(" releases" ), // For org.scala-sbt stuff
575
+ libraryDependencies ++= Seq (
576
+ " org.scala-sbt" % " interface" % sbtVersion.value,
577
+ " org.scala-sbt" % " api" % sbtVersion.value % " test" ,
578
+ " org.specs2" %% " specs2" % " 2.3.11" % " test"
579
+ ),
580
+ // The sources should be published with crossPaths := false since they
581
+ // need to be compiled by the project using the bridge.
582
+ crossPaths := false ,
568
583
569
- IO .delete(file(home) / " .ivy2" / " cache" / sbtOrg / s " $org- $artifact- $dottySbtBridgeVersion-bin_ ${dottyVersion}__ $classVersion" )
570
- IO .delete(file(home) / " .sbt" / " boot" / s " scala- $sbtScalaVersion" / sbtOrg / " sbt" / sbtV / s " $org- $artifact- $dottySbtBridgeVersion-bin_ ${dottyVersion}__ $classVersion" )
571
- },
572
- publishLocal := (publishLocal.dependsOn(cleanSbtBridge)).value,
573
- description := " sbt compiler bridge for Dotty" ,
574
- resolvers += Resolver .typesafeIvyRepo(" releases" ), // For org.scala-sbt stuff
575
- libraryDependencies ++= Seq (
576
- " org.scala-sbt" % " interface" % sbtVersion.value,
577
- " org.scala-sbt" % " api" % sbtVersion.value % " test" ,
578
- " org.specs2" %% " specs2" % " 2.3.11" % " test"
579
- ),
580
- // The sources should be published with crossPaths := false since they
581
- // need to be compiled by the project using the bridge.
582
- crossPaths := false ,
584
+ // Don't publish any binaries for the bridge because of the above
585
+ publishArtifact in (Compile , packageBin) := false ,
583
586
584
- // Don't publish any binaries for the bridge because of the above
585
- publishArtifact in (Compile , packageBin) := false ,
587
+ fork in Test := true ,
588
+ parallelExecution in Test := false
589
+ )
586
590
587
- fork in Test := true ,
588
- parallelExecution in Test := false
589
- ).
591
+ lazy val `dotty-sbt-bridge` = project.in(file(" sbt-bridge" )).
592
+ dependsOn(`dotty-compiler`).
593
+ settings(commonSettings).
594
+ settings(dottySbtBridgeSettings).
590
595
settings(ScriptedPlugin .scriptedSettings: _* ).
591
596
settings(
592
597
ScriptedPlugin .sbtTestDirectory := baseDirectory.value / " sbt-test" ,
@@ -625,6 +630,13 @@ object DottyInjectedPlugin extends AutoPlugin {
625
630
*/
626
631
)
627
632
633
+ lazy val `dotty-sbt-bridge-bootstrapped` = project.in(file(" sbt-bridge" )).
634
+ dependsOn(`dotty-compiler-bootstrapped`).
635
+ settings(commonSettings).
636
+ settings(commonBootstrappedSettings).
637
+ settings(dottySbtBridgeSettings)
638
+
639
+
628
640
/** A sandbox to play with the Scala.js back-end of dotty.
629
641
*
630
642
* This sandbox is compiled with dotty with support for Scala.js. It can be
0 commit comments