Skip to content

Add dummy scala{-compiler,-reflect,p} #1889

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 9, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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