From c67bbcc425da8ced8765e080cb90d25fa823f8d2 Mon Sep 17 00:00:00 2001 From: Matthias Kurz Date: Tue, 20 Sep 2022 12:37:56 +0200 Subject: [PATCH 1/3] Scala 2.12.17 / 2.13.9 + scala-xml 2.1.0 --- .github/workflows/build-test.yml | 2 +- build.sbt | 9 ++------- docs/build.sbt | 2 +- project/Dependencies.scala | 4 ++-- 4 files changed, 6 insertions(+), 11 deletions(-) diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml index e2db8af3..8c431105 100644 --- a/.github/workflows/build-test.yml +++ b/.github/workflows/build-test.yml @@ -40,7 +40,7 @@ jobs: uses: playframework/.github/.github/workflows/cmd.yml@v2 with: java: 11, 8 - scala: 2.12.16, 2.13.8, 3.2.0 + scala: 2.12.17, 2.13.9, 3.2.0 cmd: scripts/test-code.sh finish: diff --git a/build.sbt b/build.sbt index 0dc75acb..d4969e3a 100644 --- a/build.sbt +++ b/build.sbt @@ -78,13 +78,8 @@ lazy val api = crossProject(JVMPlatform, JSPlatform) "org.scalatest.tools.ScalaTestFramework" ) ), - libraryDependencies += "org.scala-lang.modules" %%% "scala-xml" % { - CrossVersion.partialVersion(scalaVersion.value) match { - case Some((2, 12)) => "1.3.0" - case _ => "2.1.0" - } - }, - libraryDependencies += "org.scalatest" %%% "scalatest" % ScalaTestVersion % Test, + libraryDependencies += "org.scala-lang.modules" %%% "scala-xml" % "2.1.0", + libraryDependencies += "org.scalatest" %%% "scalatest" % ScalaTestVersion % Test, ) lazy val apiJvm = api.jvm diff --git a/docs/build.sbt b/docs/build.sbt index fd9da908..9a2332db 100644 --- a/docs/build.sbt +++ b/docs/build.sbt @@ -3,7 +3,7 @@ lazy val docs = project .enablePlugins(PlayDocsPlugin) .configs(Configuration.of("Docs", "docs")) .settings( - scalaVersion := "2.12.16", + scalaVersion := "2.12.17", // use special snapshot play version for now resolvers ++= DefaultOptions.resolvers(snapshot = true), resolvers += Resolver.typesafeRepo("releases"), diff --git a/project/Dependencies.scala b/project/Dependencies.scala index 22153fbc..75c5ab91 100644 --- a/project/Dependencies.scala +++ b/project/Dependencies.scala @@ -1,6 +1,6 @@ object Dependencies { - val Scala212 = "2.12.16" - val Scala213 = "2.13.8" + val Scala212 = "2.12.17" + val Scala213 = "2.13.9" val Scala3 = "3.2.0" val ScalaVersions = Seq(Scala212, Scala213, Scala3) } From 30215325de71878b97e73831f9c1f9222b4078eb Mon Sep 17 00:00:00 2001 From: Matthias Kurz Date: Thu, 22 Sep 2022 14:43:35 +0200 Subject: [PATCH 2/3] Workarounds: scala 2.12.17 and native packager, both with scala-xml 2 --- docs/project/plugins.sbt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/docs/project/plugins.sbt b/docs/project/plugins.sbt index af79de5d..3bac35bb 100644 --- a/docs/project/plugins.sbt +++ b/docs/project/plugins.sbt @@ -1,4 +1,7 @@ -lazy val plugins = (project in file(".")).dependsOn(sbtTwirl) +lazy val plugins = (project in file(".")).dependsOn(sbtTwirl).settings( + excludeDependencies += "com.typesafe.sbt" % "sbt-native-packager", // TODO: remove when Play switched to com.github.sbt + scalaVersion := "2.12.17", // TODO: remove when upgraded to sbt 1.8.0 (maybe even 1.7.2), see https://github.com/sbt/sbt/pull/7021 +) lazy val sbtTwirl = ProjectRef(Path.fileProperty("user.dir").getParentFile, "plugin") @@ -7,3 +10,4 @@ resolvers ++= DefaultOptions.resolvers(snapshot = true) addSbtPlugin("com.typesafe.play" % "play-docs-sbt-plugin" % sys.props.getOrElse("play.version", "2.8.0")) addSbtPlugin("de.heikoseeberger" % "sbt-header" % "5.7.0") addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.4.6") +addSbtPlugin("com.github.sbt" % "sbt-native-packager" % "1.9.11") // TODO: remove when Play itself pulls in 1.9.11+ From 06018d63cab54fb803f852d061d59b3e150ca6e8 Mon Sep 17 00:00:00 2001 From: Matthias Kurz Date: Thu, 22 Sep 2022 15:30:51 +0200 Subject: [PATCH 3/3] Scala 2.12.17 in scripted tests --- sbt-twirl/src/sbt-test/twirl/compile/project/plugins.sbt | 4 ++++ .../src/sbt-test/twirl/scalajs-compile/project/plugins.sbt | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/sbt-twirl/src/sbt-test/twirl/compile/project/plugins.sbt b/sbt-twirl/src/sbt-test/twirl/compile/project/plugins.sbt index 8519640a..a5ac4f10 100644 --- a/sbt-twirl/src/sbt-test/twirl/compile/project/plugins.sbt +++ b/sbt-twirl/src/sbt-test/twirl/compile/project/plugins.sbt @@ -1 +1,5 @@ +lazy val plugins = (project in file(".")).settings( + scalaVersion := "2.12.17", // TODO: remove when upgraded to sbt 1.8.0 (maybe even 1.7.2), see https://github.com/sbt/sbt/pull/7021 +) + addSbtPlugin("com.typesafe.play" % "sbt-twirl" % sys.props("project.version")) diff --git a/sbt-twirl/src/sbt-test/twirl/scalajs-compile/project/plugins.sbt b/sbt-twirl/src/sbt-test/twirl/scalajs-compile/project/plugins.sbt index 7fe9e249..4e842e37 100644 --- a/sbt-twirl/src/sbt-test/twirl/scalajs-compile/project/plugins.sbt +++ b/sbt-twirl/src/sbt-test/twirl/scalajs-compile/project/plugins.sbt @@ -1,2 +1,6 @@ +lazy val plugins = (project in file(".")).settings( + scalaVersion := "2.12.17", // TODO: remove when upgraded to sbt 1.8.0 (maybe even 1.7.2), see https://github.com/sbt/sbt/pull/7021 +) + addSbtPlugin("com.typesafe.play" % "sbt-twirl" % sys.props("project.version")) addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.11.0")