Skip to content

Commit 0b53bea

Browse files
committed
Add dummy scala{-compiler,-reflect,p}
This is needed to make dotty-compiled projects work with sbt 0.13.13, the other needed fix is sbt/sbt#2897
1 parent add9a03 commit 0b53bea

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

project/Build.scala

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -559,6 +559,32 @@ object DottyInjectedPlugin extends AutoPlugin {
559559
).
560560
settings(publishing)
561561

562+
// sbt >= 0.13.12 will automatically rewrite transitive dependencies on
563+
// any version in any organization of scala{-library,-compiler,-reflect,p}
564+
// to have organization `scalaOrganization` and version `scalaVersion`
565+
// (see https://github.com/sbt/sbt/pull/2634).
566+
// This means that we need to provide dummy artefacts for these projects,
567+
// otherwise users will get compilation errors if they happen to transitively
568+
// depend on one of these projects.
569+
lazy val `scala-compiler` = project.
570+
settings(
571+
crossPaths := false,
572+
libraryDependencies := Seq(scalaCompiler)
573+
).
574+
settings(publishing)
575+
lazy val `scala-reflect` = project.
576+
settings(
577+
crossPaths := false,
578+
libraryDependencies := Seq("org.scala-lang" % "scala-reflect" % scalaVersion.value)
579+
).
580+
settings(publishing)
581+
lazy val `scalap` = project.
582+
settings(
583+
crossPaths := false,
584+
libraryDependencies := Seq("org.scala-lang" % "scalap" % scalaVersion.value)
585+
).
586+
settings(publishing)
587+
562588
lazy val publishing = Seq(
563589
publishMavenStyle := true,
564590
publishArtifact := true,

0 commit comments

Comments
 (0)