Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,6 @@ env:

script: admin/build.sh

jdk: oraclejdk8
jdk:
- oraclejdk8
- openjdk11
6 changes: 4 additions & 2 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ scalaVersionsByJvm in ThisBuild := {
val v213 = "2.13.0-M3"
Map(
8 -> List(v213 -> true),
9 -> List(v213 -> false))
11 -> List(v213 -> false))
}

scalacOptions in ThisBuild ++= Seq("-deprecation", "-feature", "-Xfatal-warnings")
Expand Down Expand Up @@ -53,7 +53,9 @@ lazy val core = project.in(file("core")).settings(scalaModuleSettings).settings(
)

lazy val junit = project.in(file("junit")).settings(
libraryDependencies += "com.novocode" % "junit-interface" % "0.11" % "test",
libraryDependencies += "com.novocode" % "junit-interface" % "0.11" % Test,
// for javax.xml.bind.DatatypeConverter, used in SerializationStabilityTest
libraryDependencies += "javax.xml.bind" % "jaxb-api" % "2.3.0" % Test,
testOptions += Tests.Argument(TestFrameworks.JUnit, "-a", "-v"),
fork in Test := true,
disablePublishing
Expand Down
6 changes: 4 additions & 2 deletions junit/src/test/scala/scala/SerializationStabilityTest.scala
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ object SerializationStability extends App {
def patch(file: File, line: Int, prevResult: String, result: String): Unit = {
amend(file) {
content =>
content.lines.toList.zipWithIndex.map {
// Predef.augmentString = work around scala/bug#11125 on JDK 11
augmentString(content).lines.toList.zipWithIndex.map {
case (content, i) if i == line - 1 =>
val newContent = content.replaceAllLiterally(quote(prevResult), quote(result))
if (newContent != content)
Expand All @@ -50,7 +51,8 @@ object SerializationStability extends App {
val newComment = s" // Generated on $timestamp with Scala ${scala.util.Properties.versionString})"
amend(file) {
content =>
content.lines.toList.map {
// Predef.augmentString = work around scala/bug#11125 on JDK 11
augmentString(content).lines.toList.map {
f => f.replaceAll("""^ +// Generated on.*""", newComment)
}.mkString("\n")
}
Expand Down