@@ -13,43 +13,53 @@ scalaVersionsByJvm in ThisBuild := {
13
13
14
14
lazy val root = project.in(file(" ." ))
15
15
.aggregate(xmlJS, xmlJVM)
16
- .settings(publish := {}, publishLocal := {} )
16
+ .settings(disablePublishing )
17
17
18
18
lazy val xml = crossProject.in(file(" ." ))
19
+ .settings(scalaModuleSettings)
20
+ .jvmSettings(scalaModuleSettingsJVM)
19
21
.settings(
20
22
name := " scala-xml" ,
21
23
version := " 1.0.7-SNAPSHOT" ,
24
+
22
25
scalacOptions ++= " -deprecation:false -feature -Xlint:-stars-align,-nullary-unit,_" .split(" \\ s+" ).to[Seq ],
23
26
scalacOptions in Test += " -Xxml:coalescing" ,
27
+
24
28
apiMappings ++= Map (
25
29
scalaInstance.value.libraryJar
26
30
-> url(s " http://www.scala-lang.org/api/ ${scalaVersion.value}/ " ),
27
31
// http://stackoverflow.com/questions/16934488
28
32
file(System .getProperty(" sun.boot.class.path" ).split(java.io.File .pathSeparator).filter(_.endsWith(java.io.File .separator + " rt.jar" )).head)
29
33
-> 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
+ })
32
49
.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
+ )
53
63
.jsConfigure(_.enablePlugins(ScalaJSJUnitPlugin ))
54
64
55
65
lazy val xmlJVM = xml.jvm
0 commit comments