@@ -14,20 +14,14 @@ lazy val configSettings: Seq[Setting[?]] = Seq(
1414 unmanagedSourceDirectories.value.flatMap { dir =>
1515 def forVersion (version : String ): File = file(dir.getPath ++ " -" ++ version)
1616 CrossVersion .partialVersion(scalaVersion.value) match {
17- case Some ((3 , _)) => Seq (forVersion(" 3" ), forVersion(" 2.13+" ))
18- case Some ((2 , minor)) =>
19- Seq (forVersion(" 2" )) ++ (minor match {
20- case 13 => Seq (forVersion(" 2.13" ), forVersion(" 2.13+" ))
21- case 12 => Seq (forVersion(" 2.12" ))
22- case _ => Seq ()
23- })
24- case _ => Seq ()
17+ case Some ((2 , 13 )) => Seq (forVersion(" 2.13" ))
18+ case _ => Seq (forVersion(" 2.11-2.12" ))
2519 }
2620 }
2721 }
2822)
2923
30- lazy val xml = crossProject(JSPlatform , JVMPlatform , NativePlatform )
24+ lazy val xml = crossProject(JSPlatform , JVMPlatform )
3125 .withoutSuffixFor(JVMPlatform )
3226 .crossType(CrossType .Full )
3327 .in(file(" ." ))
@@ -36,17 +30,10 @@ lazy val xml = crossProject(JSPlatform, JVMPlatform, NativePlatform)
3630 .settings(
3731 name := " scala-xml" ,
3832 scalaModuleAutomaticModuleName := Some (" scala.xml" ),
39- crossScalaVersions := Seq (" 2.13.11" , " 2.12.18" , " 3.3.0 " ),
33+ crossScalaVersions := Seq (" 2.13.11" , " 2.12.18" , " 2.11.12 " ),
4034 scalaVersion := " 2.12.18" ,
4135
42- scalacOptions ++= (CrossVersion .partialVersion(scalaVersion.value) match {
43- case Some ((3 , _)) =>
44- Seq (" -language:Scala2" )
45- case _ =>
46- // Compiler team advised avoiding the -Xsource:3 option for releases.
47- // The output with -Xsource:3 should be periodically checked, though.
48- Seq (" -deprecation:false" , " -feature" , " -Xlint:-stars-align,-nullary-unit,_" )
49- }),
36+ scalacOptions ++= Seq (" -deprecation:false" , " -feature" , " -Xlint:-stars-align,-nullary-unit,_" ),
5037
5138 Test / scalacOptions += " -Xxml:coalescing" ,
5239
@@ -63,29 +50,6 @@ lazy val xml = crossProject(JSPlatform, JVMPlatform, NativePlatform)
6350 | """ .stripMargin)),
6451
6552 versionPolicyIntention := Compatibility .BinaryCompatible ,
66- // Note: See discussion on non-JVM Mima in https://github.com/scala/scala-xml/pull/517
67- mimaBinaryIssueFilters ++= {
68- // import com.typesafe.tools.mima.core.{}
69- // import com.typesafe.tools.mima.core.ProblemFilters
70- Seq ( // exclusions for all Scala versions
71- ) ++ (CrossVersion .partialVersion(scalaVersion.value) match {
72- case Some ((3 , _)) => Seq ( // Scala 3-specific exclusions
73- )
74- case Some ((2 , minor)) => Seq ( // Scala 2-specific exclusions
75- ) ++ (minor match {
76- case 13 => Seq ( // Scala 2.13-specific exclusions
77- )
78- case 12 => Seq ( // Scala 2.12-specific exclusions
79- )
80- })
81- case _ => Seq ()
82- })
83- },
84- // Mima signature checking stopped working after 3.0.2 upgrade, see #557
85- mimaReportSignatureProblems := (CrossVersion .partialVersion(scalaVersion.value) match {
86- case Some ((3 , _)) => false
87- case _ => true
88- }),
8953
9054 apiMappings ++= scalaInstance.value.libraryJars.filter { file =>
9155 file.getName.startsWith(" scala-library" ) && file.getName.endsWith(" .jar" )
@@ -121,41 +85,11 @@ lazy val xml = crossProject(JSPlatform, JVMPlatform, NativePlatform)
12185 libraryDependencies += " junit" % " junit" % " 4.13.2" % Test ,
12286 libraryDependencies += " com.github.sbt" % " junit-interface" % " 0.13.3" % Test ,
12387 libraryDependencies += " org.apache.commons" % " commons-lang3" % " 3.12.0" % Test ,
124- libraryDependencies += " xerces" % " xercesImpl" % " 2.12.2" % Test ,
125- libraryDependencies ++= (CrossVersion .partialVersion(scalaVersion.value) match {
126- case Some ((3 , _)) =>
127- Seq ()
128- case _ =>
129- Seq (" org.scala-lang" % " scala-compiler" % scalaVersion.value % Test )
130- }),
88+ libraryDependencies += (" org.scala-lang" % " scala-compiler" % scalaVersion.value % Test ).exclude(" org.scala-lang.modules" , s " scala-xml_ ${scalaBinaryVersion.value}" )
13189 )
13290 .jsSettings(
91+ crossScalaVersions := crossScalaVersions.value.filterNot(_.startsWith(" 2.11" )),
13392 // Scala.js cannot run forked tests
13493 Test / fork := false
13594 )
13695 .jsEnablePlugins(ScalaJSJUnitPlugin )
137- .nativeSettings(
138- versionPolicyCheck / skip := true ,
139- versionCheck / skip := true ,
140- // Scala Native cannot run forked tests
141- Test / fork := false ,
142- libraryDependencies += " org.scala-native" %%% " junit-runtime" % nativeVersion % Test ,
143- Test / scalacOptions += {
144- val log = streams.value.log
145- val retrieveDir = baseDirectory.value / " scala-native-junit-plugin-jars"
146- val lm = dependencyResolution.value
147- val cp = lm
148- .retrieve(
149- " org.scala-native" % s " junit-plugin_ ${scalaVersion.value}" % nativeVersion,
150- scalaModuleInfo = None ,
151- retrieveDir,
152- log
153- )
154- .fold(w => throw w.resolveException, identity)
155- val jarPath = cp
156- .find(_.toString.contains(" junit-plugin" ))
157- .getOrElse(throw new Exception (" Can't find Scala Native junit-plugin jar" ))
158- s " -Xplugin: $jarPath"
159- },
160- Test / testOptions += Tests .Argument (TestFrameworks .JUnit , " -a" , " -s" , " -v" ),
161- )
0 commit comments