Skip to content

Commit 5501c95

Browse files
committed
Fix deprecated ScalaInstance.libraryJar
Change to using xsbti.compile.ScalaInstance.libraryJars in sbt build.
1 parent 0a48964 commit 5501c95

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

Diff for: build.sbt

+6-4
Original file line numberDiff line numberDiff line change
@@ -117,10 +117,12 @@ lazy val xml = crossProject(JSPlatform, JVMPlatform)
117117
apiURL := Some(
118118
url(s"""https://scala.github.io/scala-xml/api/${"-.*".r.replaceAllIn(version.value, "")}/""")
119119
),
120-
apiMappings ++= Map(
121-
scalaInstance.value.libraryJar
122-
-> url(s"http://www.scala-lang.org/api/${scalaVersion.value}/")
123-
) ++ {
120+
apiMappings ++= scalaInstance.value.libraryJars.filter { file =>
121+
file.getName.startsWith("scala-library") && file.getName.endsWith(".jar")
122+
}.map { libraryJar =>
123+
libraryJar ->
124+
url(s"http://www.scala-lang.org/api/${scalaVersion.value}/")
125+
}.toMap ++ {
124126
// http://stackoverflow.com/questions/16934488
125127
Option(System.getProperty("sun.boot.class.path")).flatMap { classPath =>
126128
classPath.split(java.io.File.pathSeparator).find(_.endsWith(java.io.File.separator + "rt.jar"))

0 commit comments

Comments
 (0)