Skip to content

Commit dec3e5c

Browse files
authored
Support Scala 3 (#99)
1 parent 0fe684c commit dec3e5c

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

src/main/scala/com/thoughtworks/sbtScalaJsMap/ScalaJsMap.scala

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,13 @@ object ScalaJsMap extends AutoPlugin {
8686
} else {
8787
path
8888
}
89-
raw"""-P:scalajs:mapSourceURI:${repositoryBuilder.getWorkTree.toURI}->https://github.com/$slug/raw/${head.name}/"""
89+
val key = CrossVersion.partialVersion(scalaVersion.value) match {
90+
case Some((3, _)) =>
91+
"-scalajs-mapSourceURI"
92+
case _ =>
93+
"-P:scalajs:mapSourceURI"
94+
}
95+
raw"""$key:${repositoryBuilder.getWorkTree.toURI}->https://github.com/$slug/raw/${head.name}/"""
9096
}
9197
}
9298
},

0 commit comments

Comments
 (0)