Skip to content

Commit ff85ece

Browse files
committed
adjust build to 1.x branch
1 parent 975b95b commit ff85ece

File tree

4 files changed

+9
-157
lines changed

4 files changed

+9
-157
lines changed

‎.github/workflows/ci.yml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
fail-fast: false
1111
matrix:
1212
java: [8, 11, 17]
13-
scala: [2.12.x, 2.13.x, 3.x]
13+
scala: [2.11.x, 2.12.x, 2.13.x]
1414
runs-on: ubuntu-latest
1515
steps:
1616
- uses: actions/checkout@v2
@@ -22,4 +22,4 @@ jobs:
2222
java-version: ${{matrix.java}}
2323
cache: sbt
2424
- name: Test
25-
run: sbt ++${{matrix.scala}} test headerCheck versionPolicyCheck package
25+
run: sbt ++${{matrix.scala}} test versionPolicyCheck package

‎.travis.yml‎

Lines changed: 0 additions & 28 deletions
This file was deleted.

‎build.sbt‎

Lines changed: 7 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -14,20 +14,14 @@ lazy val configSettings: Seq[Setting[?]] = Seq(
1414
unmanagedSourceDirectories.value.flatMap{dir =>
1515
defforVersion(version: String):File= file(dir.getPath ++"-"++ version)
1616
CrossVersion.partialVersion(scalaVersion.value) match{
17-
caseSome((3, _)) =>Seq(forVersion("3"), forVersion("2.13+"))
18-
caseSome((2, minor)) =>
19-
Seq(forVersion("2")) ++ (minor match{
20-
case13=>Seq(forVersion("2.13"), forVersion("2.13+"))
21-
case12=>Seq(forVersion("2.12"))
22-
case _ =>Seq()
23-
})
24-
case _ =>Seq()
17+
caseSome((2, 13)) =>Seq(forVersion("2.13"))
18+
case _ =>Seq(forVersion("2.11-2.12"))
2519
}
2620
}
2721
}
2822
)
2923

30-
lazyvalxml= crossProject(JSPlatform, JVMPlatform, NativePlatform)
24+
lazyvalxml= 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-
caseSome((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-
caseSome((3, _)) =>Seq( // Scala 3-specific exclusions
73-
)
74-
caseSome((2, minor)) =>Seq( // Scala 2-specific exclusions
75-
) ++ (minor match{
76-
case13=>Seq( // Scala 2.13-specific exclusions
77-
)
78-
case12=>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-
caseSome((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-
caseSome((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-
vallog= streams.value.log
145-
valretrieveDir= baseDirectory.value /"scala-native-junit-plugin-jars"
146-
vallm= dependencyResolution.value
147-
valcp= 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-
valjarPath= cp
156-
.find(_.toString.contains("junit-plugin"))
157-
.getOrElse(thrownewException("Can't find Scala Native junit-plugin jar"))
158-
s"-Xplugin:$jarPath"
159-
},
160-
Test/ testOptions +=Tests.Argument(TestFrameworks.JUnit, "-a", "-s", "-v"),
161-
)

‎build.sh‎

Lines changed: 0 additions & 54 deletions
This file was deleted.

0 commit comments

Comments
(0)