Skip to content

Commit

Permalink
Add dummy scala{-compiler,-reflect,p}
Browse files Browse the repository at this point in the history
This is needed to make dotty-compiled projects work with sbt 0.13.13, the
other needed fix is sbt/sbt#2897
  • Loading branch information
smarter committed Jan 8, 2017
1 parent add9a03 commit 76e2cce
Showing 1 changed file with 28 additions and 1 deletion.
29 changes: 28 additions & 1 deletion project/Build.scala
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,8 @@ object DottyBuild extends Build {
// this is only necessary for compatibility with sbt which currently hardcodes the "dotty" artifact name
lazy val dotty = project.in(file(".")).
// FIXME: we do not aggregate `bin` because its tests delete jars, thus breaking other tests
aggregate(`dotty-interfaces`, `dotty-library`, `dotty-compiler`, dottySbtBridgeRef, `scala-library`).
aggregate(`dotty-interfaces`, `dotty-library`, `dotty-compiler`, dottySbtBridgeRef,
`scala-library`, `scala-compiler`, `scala-reflect`, `scalap`).
dependsOn(`dotty-compiler`).
dependsOn(`dotty-library`).
settings(
Expand Down Expand Up @@ -559,6 +560,32 @@ object DottyInjectedPlugin extends AutoPlugin {
).
settings(publishing)

// sbt >= 0.13.12 will automatically rewrite transitive dependencies on
// any version in any organization of scala{-library,-compiler,-reflect,p}
// to have organization `scalaOrganization` and version `scalaVersion`
// (see https://github.com/sbt/sbt/pull/2634).
// This means that we need to provide dummy artefacts for these projects,
// otherwise users will get compilation errors if they happen to transitively
// depend on one of these projects.
lazy val `scala-compiler` = project.
settings(
crossPaths := false,
libraryDependencies := Seq(scalaCompiler)
).
settings(publishing)
lazy val `scala-reflect` = project.
settings(
crossPaths := false,
libraryDependencies := Seq("org.scala-lang" % "scala-reflect" % scalaVersion.value)
).
settings(publishing)
lazy val `scalap` = project.
settings(
crossPaths := false,
libraryDependencies := Seq("org.scala-lang" % "scalap" % scalaVersion.value)
).
settings(publishing)

lazy val publishing = Seq(
publishMavenStyle := true,
publishArtifact := true,
Expand Down

0 comments on commit 76e2cce

Please sign in to comment.