@@ -13,43 +13,53 @@ scalaVersionsByJvm in ThisBuild := {
1313
1414lazy val root = project.in(file(" ." ))
1515 .aggregate(xmlJS, xmlJVM)
16- .settings(publish := {}, publishLocal := {} )
16+ .settings(disablePublishing )
1717
1818lazy 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
5565lazy val xmlJVM = xml.jvm
0 commit comments