Skip to content

Commit 83125f3

Browse files
committed
Update junit-interface to 0.13.3
1 parent e56a3af commit 83125f3

File tree

1 file changed

+77
-46
lines changed

1 file changed

+77
-46
lines changed

build.sbt

+77-46
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,14 @@
11
import sbtcrossproject.CrossPlugin.autoImport.{crossProject, CrossType}
22

3-
publish / skip := true // root project
3+
publish / skip := true // root project
44

55
ThisBuild / startYear := Some(2002)
6-
ThisBuild / licenses += (("Apache-2.0", url("https://www.apache.org/licenses/LICENSE-2.0")))
6+
ThisBuild / licenses += (
7+
(
8+
"Apache-2.0",
9+
url("https://www.apache.org/licenses/LICENSE-2.0")
10+
)
11+
)
712

813
// because it doesn't declare it itself
914
ThisBuild / libraryDependencySchemes += "org.scala-js" %% "scalajs-library" % "semver-spec"
@@ -14,12 +19,14 @@ lazy val configSettings: Seq[Setting[_]] = Seq(
1419
val sv = scalaVersion.value
1520
Seq(
1621
CrossVersion.partialVersion(sv) match {
17-
case Some((major, minor)) if major > 2 || (major == 2 && minor >= 13) => file(dir.getPath ++ "-2.13+")
18-
case _ => file(dir.getPath ++ "-2.13-")
22+
case Some((major, minor))
23+
if major > 2 || (major == 2 && minor >= 13) =>
24+
file(dir.getPath ++ "-2.13+")
25+
case _ => file(dir.getPath ++ "-2.13-")
1926
},
2027
CrossVersion.partialVersion(sv) match {
21-
case Some((2, _)) => file(dir.getPath ++ "-2.x")
22-
case _ => file(dir.getPath ++ "-3.x")
28+
case Some((2, _)) => file(dir.getPath ++ "-2.x")
29+
case _ => file(dir.getPath ++ "-3.x")
2330
}
2431
)
2532
}
@@ -33,30 +40,30 @@ lazy val xml = crossProject(JSPlatform, JVMPlatform, NativePlatform)
3340
.settings(ScalaModulePlugin.scalaModuleSettings)
3441
.jvmSettings(ScalaModulePlugin.scalaModuleOsgiSettings)
3542
.settings(
36-
name := "scala-xml",
43+
name := "scala-xml",
3744
scalaModuleAutomaticModuleName := Some("scala.xml"),
3845
crossScalaVersions := Seq("2.13.7", "2.12.15", "3.0.2", "3.1.0"),
3946
scalaVersion := "2.12.15",
40-
4147
// Don't publish for Scala 3.1 or later, only from 3.0
4248
publish / skip := (CrossVersion.partialVersion(scalaVersion.value) match {
4349
case Some((3, x)) if x > 0 => true
4450
case _ => false
4551
}),
46-
4752
scalacOptions ++= (CrossVersion.partialVersion(scalaVersion.value) match {
4853
case Some((3, _)) =>
4954
Seq("-language:Scala2")
5055
case _ =>
5156
// Compiler team advised avoiding the -Xsource:3 option for releases.
5257
// The output with -Xsource:3 should be periodically checked, though.
53-
Seq("-deprecation:false", "-feature", "-Xlint:-stars-align,-nullary-unit,_")
58+
Seq(
59+
"-deprecation:false",
60+
"-feature",
61+
"-Xlint:-stars-align,-nullary-unit,_"
62+
)
5463
}),
55-
56-
Test / scalacOptions += "-Xxml:coalescing",
57-
58-
headerLicense := Some(HeaderLicense.Custom(
59-
s"""|Scala (https://www.scala-lang.org)
64+
Test / scalacOptions += "-Xxml:coalescing",
65+
headerLicense := Some(
66+
HeaderLicense.Custom(s"""|Scala (https://www.scala-lang.org)
6067
|
6168
|Copyright EPFL and Lightbend, Inc.
6269
|
@@ -65,8 +72,8 @@ lazy val xml = crossProject(JSPlatform, JVMPlatform, NativePlatform)
6572
|
6673
|See the NOTICE file distributed with this work for
6774
|additional information regarding copyright ownership.
68-
|""".stripMargin)),
69-
75+
|""".stripMargin)
76+
),
7077
// Note: Change back to BinaryAndSourceCompatible after 2.1.0 release
7178
versionPolicyIntention := Compatibility.BinaryCompatible,
7279
// Note: See discussion on non-JVM Mima in https://github.com/scala/scala-xml/pull/517
@@ -77,43 +84,64 @@ lazy val xml = crossProject(JSPlatform, JVMPlatform, NativePlatform)
7784
// afaict this is just a JDK 8 vs 16 difference, producing a false positive when
7885
// we compare classes built on JDK 16 (which we only do on CI, not at release time)
7986
// to previous-version artifacts that were built on 8. see scala/scala-xml#501
80-
exclude[DirectMissingMethodProblem]("scala.xml.include.sax.XIncluder.declaration"),
81-
87+
exclude[DirectMissingMethodProblem](
88+
"scala.xml.include.sax.XIncluder.declaration"
89+
),
8290
// necessitated by the switch from DefaultHandler to DefaultHandler2 in FactoryAdapter:
83-
exclude[MissingTypesProblem]("scala.xml.parsing.FactoryAdapter"), // see #549
91+
exclude[MissingTypesProblem](
92+
"scala.xml.parsing.FactoryAdapter"
93+
), // see #549
8494

8595
// necessitated by the introduction of new abstract methods in FactoryAdapter:
86-
exclude[ReversedMissingMethodProblem]("scala.xml.parsing.FactoryAdapter.createComment"), // see #549
87-
exclude[ReversedMissingMethodProblem]("scala.xml.parsing.FactoryAdapter.createPCData") // see #558
96+
exclude[ReversedMissingMethodProblem](
97+
"scala.xml.parsing.FactoryAdapter.createComment"
98+
), // see #549
99+
exclude[ReversedMissingMethodProblem](
100+
"scala.xml.parsing.FactoryAdapter.createPCData"
101+
) // see #558
88102
)
89103
},
90104
// Mima signature checking stopped working after 3.0.2 upgrade, see #557
91-
mimaReportSignatureProblems := (CrossVersion.partialVersion(scalaVersion.value) match {
105+
mimaReportSignatureProblems := (CrossVersion.partialVersion(
106+
scalaVersion.value
107+
) match {
92108
case Some((3, _)) => false
93-
case _ => true
109+
case _ => true
94110
}),
95-
96-
apiMappings ++= scalaInstance.value.libraryJars.filter { file =>
97-
file.getName.startsWith("scala-library") && file.getName.endsWith(".jar")
98-
}.map { libraryJar =>
99-
libraryJar ->
100-
url(s"http://www.scala-lang.org/api/${scalaVersion.value}/")
101-
}.toMap ++ {
102-
// http://stackoverflow.com/questions/16934488
103-
Option(System.getProperty("sun.boot.class.path")).flatMap { classPath =>
104-
classPath.split(java.io.File.pathSeparator).find(_.endsWith(java.io.File.separator + "rt.jar"))
105-
}.map { jarPath =>
106-
Map(
107-
file(jarPath)
108-
-> url("http://docs.oracle.com/javase/8/docs/api")
111+
apiMappings ++= scalaInstance.value.libraryJars
112+
.filter { file =>
113+
file.getName.startsWith("scala-library") && file.getName.endsWith(
114+
".jar"
109115
)
110-
} getOrElse {
116+
}
117+
.map { libraryJar =>
118+
libraryJar ->
119+
url(s"http://www.scala-lang.org/api/${scalaVersion.value}/")
120+
}
121+
.toMap ++ {
122+
// http://stackoverflow.com/questions/16934488
123+
Option(System.getProperty("sun.boot.class.path"))
124+
.flatMap { classPath =>
125+
classPath
126+
.split(java.io.File.pathSeparator)
127+
.find(_.endsWith(java.io.File.separator + "rt.jar"))
128+
}
129+
.map { jarPath =>
130+
Map(
131+
file(jarPath)
132+
-> url("http://docs.oracle.com/javase/8/docs/api")
133+
)
134+
} getOrElse {
111135
// If everything fails, jam in Java 11 modules.
112136
Map(
113137
file("/modules/java.base")
114-
-> url("https://docs.oracle.com/en/java/javase/11/docs/api/java.base"),
138+
-> url(
139+
"https://docs.oracle.com/en/java/javase/11/docs/api/java.base"
140+
),
115141
file("/modules/java.xml")
116-
-> url("https://docs.oracle.com/en/java/javase/11/docs/api/java.xml")
142+
-> url(
143+
"https://docs.oracle.com/en/java/javase/11/docs/api/java.xml"
144+
)
117145
)
118146
}
119147
}
@@ -123,16 +151,17 @@ lazy val xml = crossProject(JSPlatform, JVMPlatform, NativePlatform)
123151
)
124152
.jvmSettings(
125153
OsgiKeys.exportPackage := Seq(s"scala.xml.*;version=${version.value}"),
126-
127154
libraryDependencies += "junit" % "junit" % "4.13.2" % Test,
128-
libraryDependencies += "com.github.sbt" % "junit-interface" % "0.13.2" % Test,
155+
libraryDependencies += "com.github.sbt" % "junit-interface" % "0.13.3" % Test,
129156
libraryDependencies += "org.apache.commons" % "commons-lang3" % "3.12.0" % Test,
130-
libraryDependencies ++= (CrossVersion.partialVersion(scalaVersion.value) match {
157+
libraryDependencies ++= (CrossVersion.partialVersion(
158+
scalaVersion.value
159+
) match {
131160
case Some((3, _)) =>
132161
Seq()
133162
case _ =>
134163
Seq("org.scala-lang" % "scala-compiler" % scalaVersion.value % Test)
135-
}),
164+
})
136165
)
137166
.jsSettings(
138167
// Scala.js cannot run forked tests
@@ -158,7 +187,9 @@ lazy val xml = crossProject(JSPlatform, JVMPlatform, NativePlatform)
158187
.fold(w => throw w.resolveException, identity(_))
159188
val jarPath = cp
160189
.find(_.toString.contains("junit-plugin"))
161-
.getOrElse(throw new Exception("Can't find Scala Native junit-plugin jar"))
190+
.getOrElse(
191+
throw new Exception("Can't find Scala Native junit-plugin jar")
192+
)
162193
s"-Xplugin:$jarPath"
163194
},
164195
Test / testOptions += Tests.Argument(TestFrameworks.JUnit, "-a", "-s", "-v")

0 commit comments

Comments
 (0)