Skip to content

Commit

Permalink
Stop cross-building reftree for scalajs (#182)
Browse files Browse the repository at this point in the history
Also:
* fix the `publish` project's base directory (thanks @eatkins, see #180 for more details)
* set `crossScalaVersions` on the root project to work around an sbt bug
  • Loading branch information
cb372 authored Sep 7, 2020
1 parent d4cc01c commit 6d947dc
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 10 deletions.
18 changes: 8 additions & 10 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,15 @@ lazy val root = (project in file("."))
.aggregate(coreJVM, coreJS)
.aggregate(metaJVM, metaJS)
.aggregate(macrosJVM, macrosJS)
.aggregate(reftreeJVM, reftreeJS)
.aggregate(reftree)
.aggregate(scalacheckJVM, scalacheckJS)
.aggregate(lawsJVM, lawsJS)
.aggregate(testsJVM, testsJS)
.aggregate(athemaJVM, athemaJS)
.aggregate(readme)
.settings(crossScalaVersions := List()) // work around https://github.com/sbt/sbt/issues/4181

lazy val publish = (project in file("."))
lazy val publish = (project in file(".publish"))
.settings(noPublishSettings)
.disablePlugins(MimaPlugin)
.aggregate(coreJVM, coreJS)
Expand Down Expand Up @@ -104,16 +105,14 @@ lazy val macros = module("macros")
lazy val macrosJVM = macros.jvm
lazy val macrosJS = macros.js

lazy val reftree = module("reftree")
.dependsOn(core)
lazy val reftree = jvmModule("reftree")
.dependsOn(coreJVM)
.settings(noScala213Settings)
.settings(
mimaPreviousArtifacts := Set(
organization.value %%% moduleName.value % V.drostePrev),
libraryDependencies ++= Seq("io.github.stanch" %%% "reftree" % "1.2.1"))

lazy val reftreeJVM = reftree.jvm
lazy val reftreeJS = reftree.js
organization.value %% moduleName.value % V.drostePrev),
libraryDependencies ++= Seq("io.github.stanch" %% "reftree" % "1.2.1")
)

lazy val scalacheck = module("scalacheck")
.dependsOn(core)
Expand Down Expand Up @@ -156,7 +155,6 @@ lazy val testsJS = tests.js
lazy val athema = module("athema", prefix = "")
.dependsOn(core)
.settings(noPublishSettings)
.settings(noScala213Settings)
.disablePlugins(MimaPlugin)
.settings(
libraryDependencies ++=
Expand Down
10 changes: 10 additions & 0 deletions project/ProjectPlugin.scala
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,16 @@ object ProjectPlugin extends AutoPlugin {
.jvmSettings(fork in Test := true)
.settings(moduleName := s"droste-$modName")

def jvmModule(
modName: String,
prefix: String = "modules/"
): Project =
Project(modName, file(s"$prefix$modName"))
.settings(
fork in Test := true,
moduleName := s"droste-$modName"
)

lazy val macroSettings: Seq[Setting[_]] = Seq(
libraryDependencies ++= Seq(
scalaOrganization.value % "scala-compiler" % scalaVersion.value % Provided,
Expand Down

0 comments on commit 6d947dc

Please # to comment.