Skip to content

Commit

Permalink
Remove sbt-dotty plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
note committed May 4, 2021
1 parent 41f2962 commit 1bba247
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ lib_managed/
src_managed/
project/boot/
project/plugins/project/
.bsp

# Scala-IDE specific
.scala_dependencies
Expand All @@ -21,3 +22,4 @@ project/plugins/project/

.bloop/
.metals/
.vscode
14 changes: 10 additions & 4 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -151,14 +151,20 @@ lazy val cats = myCrossProject("cats")

lazy val catsJVM = cats.jvm
lazy val catsJS = cats.js
lazy val isScala3Setting = Def.setting {
CrossVersion.partialVersion(scalaVersion.value) match {
case Some((3, _)) => true
case _ => false
}
}

lazy val core = myCrossProject("core")
.enablePlugins(BuildInfoPlugin)
.settings(moduleName := projectName)
.settings(
libraryDependencies ++= {
macroParadise(Compile).value ++ (
if (isDotty.value)
if (isScala3Setting.value)
Seq(
"org.scala-lang.modules" %% "scala-xml" % "2.0.0-RC1"
)
Expand All @@ -169,7 +175,7 @@ lazy val core = myCrossProject("core")
"org.scala-lang.modules" %% "scala-xml" % "1.3.0"
)
) ++ Seq(
("com.chuusai" %%% "shapeless" % shapelessVersion).withDottyCompat(scalaVersion.value),
("com.chuusai" %%% "shapeless" % shapelessVersion).cross(CrossVersion.for3Use2_13),
"org.scalacheck" %%% "scalacheck" % scalaCheckVersion % Test
)
},
Expand Down Expand Up @@ -371,7 +377,7 @@ def moduleJsSettings(name: String): Seq[Def.Setting[_]] =
else git.gitHeadCommit.value.getOrElse("master")
val local = (LocalRootProject / baseDirectory).value.toURI.toString
val remote = s"https://raw.githubusercontent.com/$gitHubOwner/$projectName/$tagOrHash/"
val opt = if (isDotty.value) "-scalajs-mapSourceURI" else "-P:scalajs:mapSourceURI"
val opt = if (isScala3Setting.value) "-scalajs-mapSourceURI" else "-P:scalajs:mapSourceURI"
s"$opt:$local->$remote"
}
)
Expand Down Expand Up @@ -458,7 +464,7 @@ lazy val compileSettings = Def.settings(
lazy val scaladocSettings = Def.settings(
Compile / doc / sources := {
val result = (Compile / doc / sources).value
if (isDotty.value) Seq.empty else result
if (isScala3Setting.value) Seq.empty else result
},
Compile / doc / scalacOptions ++= {
val tag = s"v${version.value}"
Expand Down
2 changes: 0 additions & 2 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
addSbtPlugin("ch.epfl.lamp" % "sbt-dotty" % "0.5.5")

addSbtPlugin("com.codecommit" % "sbt-github-actions" % "0.10.1")

addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.10.0")
Expand Down

0 comments on commit 1bba247

Please sign in to comment.