Skip to content

Commit 859c34e

Browse files
authored
Merge pull request #153 from ashawley/sbt-scala-module
Update sbt-scala-module to 1.0.12
2 parents f0c1e5f + 91bd5c4 commit 859c34e

File tree

2 files changed

+34
-24
lines changed

2 files changed

+34
-24
lines changed

build.sbt

+33-23
Original file line numberDiff line numberDiff line change
@@ -13,43 +13,53 @@ scalaVersionsByJvm in ThisBuild := {
1313

1414
lazy val root = project.in(file("."))
1515
.aggregate(xmlJS, xmlJVM)
16-
.settings(publish := {}, publishLocal := {})
16+
.settings(disablePublishing)
1717

1818
lazy val xml = crossProject.in(file("."))
19+
.settings(scalaModuleSettings)
20+
.jvmSettings(scalaModuleSettingsJVM)
1921
.settings(
2022
name := "scala-xml",
2123
version := "1.0.7-SNAPSHOT",
24+
2225
scalacOptions ++= "-deprecation:false -feature -Xlint:-stars-align,-nullary-unit,_".split("\\s+").to[Seq],
2326
scalacOptions in Test += "-Xxml:coalescing",
27+
2428
apiMappings ++= Map(
2529
scalaInstance.value.libraryJar
2630
-> url(s"http://www.scala-lang.org/api/${scalaVersion.value}/"),
2731
// http://stackoverflow.com/questions/16934488
2832
file(System.getProperty("sun.boot.class.path").split(java.io.File.pathSeparator).filter(_.endsWith(java.io.File.separator + "rt.jar")).head)
2933
-> url("http://docs.oracle.com/javase/8/docs/api")
30-
)
31-
)
34+
),
35+
36+
mimaBinaryIssueFilters ++= {
37+
import com.typesafe.tools.mima.core._
38+
import com.typesafe.tools.mima.core.ProblemFilters._
39+
Seq(
40+
// Scala 2.12 deprecated mutable.Stack, so we broke
41+
// binary compatability for 1.0.7 in the following way:
42+
exclude[IncompatibleMethTypeProblem]("scala.xml.parsing.FactoryAdapter.scopeStack_="),
43+
exclude[IncompatibleResultTypeProblem]("scala.xml.parsing.FactoryAdapter.hStack"),
44+
exclude[IncompatibleResultTypeProblem]("scala.xml.parsing.FactoryAdapter.scopeStack"),
45+
exclude[IncompatibleResultTypeProblem]("scala.xml.parsing.FactoryAdapter.attribStack"),
46+
exclude[IncompatibleResultTypeProblem]("scala.xml.parsing.FactoryAdapter.tagStack")
47+
)
48+
})
3249
.jvmSettings(
33-
scalaModuleSettings ++
34-
List(
35-
OsgiKeys.exportPackage := Seq(s"scala.xml.*;version=${version.value}"),
36-
libraryDependencies += "junit" % "junit" % "4.11" % "test",
37-
libraryDependencies += "com.novocode" % "junit-interface" % "0.10" % "test",
38-
libraryDependencies += ("org.scala-lang" % "scala-compiler" % scalaVersion.value % "test").exclude("org.scala-lang.modules", s"scala-xml_${scalaVersion.value}"),
39-
mimaBinaryIssueFilters ++= {
40-
import com.typesafe.tools.mima.core._
41-
import com.typesafe.tools.mima.core.ProblemFilters._
42-
Seq(
43-
// Scala 2.12 deprecated mutable.Stack, so we broke
44-
// binary compatability for 1.0.7 in the following way:
45-
exclude[IncompatibleMethTypeProblem]("scala.xml.parsing.FactoryAdapter.scopeStack_="),
46-
exclude[IncompatibleResultTypeProblem]("scala.xml.parsing.FactoryAdapter.hStack"),
47-
exclude[IncompatibleResultTypeProblem]("scala.xml.parsing.FactoryAdapter.scopeStack"),
48-
exclude[IncompatibleResultTypeProblem]("scala.xml.parsing.FactoryAdapter.attribStack"),
49-
exclude[IncompatibleResultTypeProblem]("scala.xml.parsing.FactoryAdapter.tagStack")
50-
)
51-
},
52-
mimaPreviousVersion := Some("1.0.6")): _*)
50+
OsgiKeys.exportPackage := Seq(s"scala.xml.*;version=${version.value}"),
51+
52+
// there is currently no previous released JS version, therefore MiMa is enabled only on JVM
53+
mimaPreviousVersion := Some("1.0.6"),
54+
55+
libraryDependencies += "junit" % "junit" % "4.11" % "test",
56+
libraryDependencies += "com.novocode" % "junit-interface" % "0.10" % "test",
57+
libraryDependencies += ("org.scala-lang" % "scala-compiler" % scalaVersion.value % "test").exclude("org.scala-lang.modules", s"scala-xml_${scalaVersion.value}")
58+
)
59+
.jsSettings(
60+
// Scala.js cannot run forked tests
61+
fork in Test := false
62+
)
5363
.jsConfigure(_.enablePlugins(ScalaJSJUnitPlugin))
5464

5565
lazy val xmlJVM = xml.jvm

project/plugins.sbt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
addSbtPlugin("org.scala-lang.modules" % "scala-module-plugin" % "1.0.8")
1+
addSbtPlugin("org.scala-lang.modules" % "sbt-scala-module" % "1.0.12")
22

33
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "0.6.16")

0 commit comments

Comments
 (0)