Skip to content

Commit 49078ed

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

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

build.sbt

+5-4
Original file line numberDiff line numberDiff line change
@@ -117,10 +117,11 @@ 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 -> url(s"http://www.scala-lang.org/api/${scalaVersion.value}/")
124+
}.toMap ++ {
124125
// http://stackoverflow.com/questions/16934488
125126
Option(System.getProperty("sun.boot.class.path")).flatMap { classPath =>
126127
classPath.split(java.io.File.pathSeparator).find(_.endsWith(java.io.File.separator + "rt.jar"))

0 commit comments

Comments
 (0)