From c33a4df319bdbb06973d789d1c85939cd9e37587 Mon Sep 17 00:00:00 2001 From: plokhotnyuk Date: Fri, 6 Oct 2023 10:50:06 +0200 Subject: [PATCH] Fix #1087 by publishing source map references that point on GitHub --- build.sbt | 9 +++++++++ project/plugins.sbt | 1 + 2 files changed, 10 insertions(+) diff --git a/build.sbt b/build.sbt index 55a3a76df..0586d3710 100644 --- a/build.sbt +++ b/build.sbt @@ -51,6 +51,15 @@ lazy val commonSettings = Seq( ) lazy val jsSettings = Seq( + scalacOptions += { + val localSourcesPath = baseDirectory.value.toURI + val remoteSourcesPath = s"https://raw.githubusercontent.com/plokhotnyuk/jsoniter-scala/${git.gitHeadCommit.value.get}/" + val sourcesOptionName = CrossVersion.partialVersion(scalaVersion.value) match { + case Some((2, _)) => "-P:scalajs:mapSourceURI" + case _ => "-scalajs-mapSourceURI" + } + s"$sourcesOptionName:$localSourcesPath->$remoteSourcesPath" + }, libraryDependencies ++= Seq( "io.github.cquiroz" %%% "scala-java-time-tzdb" % "2.5.0" % Test ), diff --git a/project/plugins.sbt b/project/plugins.sbt index 081a10637..b7c46beb1 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -13,6 +13,7 @@ addSbtPlugin("org.scoverage" % "sbt-scoverage" % "2.0.9") addSbtPlugin("com.typesafe" % "sbt-mima-plugin" % "1.1.3") addSbtPlugin("org.scoverage" % "sbt-coveralls" % "1.3.11") addSbtPlugin("com.evolution" % "sbt-artifactory-plugin" % "0.0.2") +addSbtPlugin("com.github.sbt" % "sbt-git" % "2.0.1") libraryDependencies ++= Seq( "org.openjdk.jmh" % "jmh-core" % "1.37",