@@ -828,7 +828,14 @@ object DottyInjectedPlugin extends AutoPlugin {
828
828
// depend on the dotty-library
829
829
lazy val `scala-library` = project.
830
830
dependsOn(`dotty-library-bootstrapped`).
831
- settings(commonDummySettings)
831
+ settings(commonDummySettings).
832
+ settings(
833
+ // Need a direct dependency on the real scala-library even though we indirectly
834
+ // depend on it via dotty-library, because sbt may rewrite dependencies
835
+ // (see https://github.com/sbt/sbt/pull/2634), but won't rewrite the direct
836
+ // dependencies of scala-library (see https://github.com/sbt/sbt/pull/2897)
837
+ libraryDependencies += " org.scala-lang" % " scala-library" % scalacVersion
838
+ )
832
839
833
840
lazy val `scala-compiler` = project.
834
841
settings(commonDummySettings)
@@ -854,7 +861,17 @@ object DottyInjectedPlugin extends AutoPlugin {
854
861
ScriptedPlugin .scriptedSettings,
855
862
ScriptedPlugin .sbtTestDirectory := baseDirectory.value / " sbt-test" ,
856
863
ScriptedPlugin .scriptedBufferLog := false ,
857
- ScriptedPlugin .scriptedLaunchOpts += " -Dplugin.version=" + version.value
864
+ ScriptedPlugin .scriptedLaunchOpts += " -Dplugin.version=" + version.value,
865
+ ScriptedPlugin .scriptedLaunchOpts += " -Dplugin.scalaVersion=" + dottyVersion,
866
+ ScriptedPlugin .scripted := ScriptedPlugin .scripted.dependsOn(Def .task {
867
+ val x0 = (publishLocal in `dotty-sbt-bridge-bootstrapped`).value
868
+ val x1 = (publishLocal in `dotty-interfaces`).value
869
+ val x2 = (publishLocal in `dotty-compiler-bootstrapped`).value
870
+ val x3 = (publishLocal in `dotty-library-bootstrapped`).value
871
+ val x4 = (publishLocal in `scala-library`).value
872
+ val x5 = (publishLocal in `scala-reflect`).value
873
+ val x6 = (publishLocal in `dotty-bootstrapped`).value // Needed because sbt currently hardcodes the dotty artifact
874
+ }).evaluated
858
875
)
859
876
860
877
lazy val publishSettings = Seq (
0 commit comments