Skip to content

Commit

Permalink
enable scalajs-mapSourceURI option if Scala 3 (#1107)
Browse files Browse the repository at this point in the history
  • Loading branch information
xuwei-k committed Mar 2, 2021
1 parent 1c7667c commit e2fb3ca
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -115,13 +115,14 @@ def revisionToUse = Def.task {

lazy val scalajsSettings = Seq(
scalacOptions ++= {
if (isDotty.value)
Seq.empty
else {
val s = revisionToUse.value
val a = (LocalRootProject / baseDirectory).value.toURI.toString
val g = "https://raw.githubusercontent.com/optics-dev/Monocle"
Seq(s"-P:scalajs:mapSourceURI:$a->$g/$s/")
val s = revisionToUse.value
val a = (LocalRootProject / baseDirectory).value.toURI.toString
val g = "https://raw.githubusercontent.com/optics-dev/Monocle"
CrossVersion.partialVersion(scalaVersion.value) match {
case Some((3, _)) =>
Seq(s"-scalajs-mapSourceURI:$a->$g")
case _ =>
Seq(s"-P:scalajs:mapSourceURI:$a->$g/$s/")
}
},
Test / testOptions += Tests.Argument(TestFrameworks.ScalaCheck, "-maxSize", "8", "-minSuccessfulTests", "50")
Expand Down

0 comments on commit e2fb3ca

Please sign in to comment.