File tree Expand file tree Collapse file tree 1 file changed +14
-5
lines changed
Expand file tree Collapse file tree 1 file changed +14
-5
lines changed Original file line number Diff line number Diff line change 11import sbt ._
22import Keys ._
33import com .jsuereth .sbtpgp .PgpKeys ._
4+ import dotty .tools .sbtplugin .DottyPlugin .autoImport ._
45import sbtcrossproject .CrossProject
56import sbtcrossproject .CrossPlugin .autoImport ._
67import scalajscrossproject .ScalaJSCrossPlugin .autoImport ._
@@ -53,11 +54,19 @@ object Lib {
5354
5455 def sourceMapsToGithub (ghProject : String ): PE =
5556 p => p.settings(
56- scalacOptions ++= (if (isSnapshot.value) Seq .empty else Seq ({
57- val a = p.base.toURI.toString.replaceFirst(" [^/]+/?$" , " " )
58- val g = s " https://raw.githubusercontent.com/japgolly/ $ghProject"
59- s " -P:scalajs:mapSourceURI: $a-> $g/v ${version.value}/ "
60- }))
57+ scalacOptions ++= {
58+ val _isDotty = isDotty.value
59+ val _isSnapshot = isSnapshot.value
60+ val ver = version.value
61+ if (_isSnapshot)
62+ Nil
63+ else {
64+ val a = p.base.toURI.toString.replaceFirst(" [^/]+/?$" , " " )
65+ val g = s " https://raw.githubusercontent.com/japgolly/ $ghProject"
66+ val flag = if (_isDotty) " -scalajs-mapSourceURI" else " -P:scalajs:mapSourceURI"
67+ s " $flag: $a-> $g/v $ver/ " :: Nil
68+ }
69+ }
6170 )
6271
6372 def preventPublication : PE =
You can’t perform that action at this time.
0 commit comments