From 11b67086f45302df267a1565891694e9de1cf503 Mon Sep 17 00:00:00 2001 From: colin-lamed <9568290+colin-lamed@users.noreply.github.com> Date: Wed, 15 May 2024 16:20:12 +0100 Subject: [PATCH 1/2] BDOG-3112 Build for Scala 3 and drop Scala 2.12 --- build.sbt | 7 ++----- project/AppDependencies.scala | 10 +++++----- project/build.properties | 2 +- project/plugins.sbt | 2 +- 4 files changed, 9 insertions(+), 12 deletions(-) diff --git a/build.sbt b/build.sbt index 2abd437..34217e0 100644 --- a/build.sbt +++ b/build.sbt @@ -1,8 +1,8 @@ import sbt.Keys._ import scala.collection.JavaConverters._ -val scala2_12 = "2.12.18" val scala2_13 = "2.13.12" +val scala3 = "3.3.3" ThisBuild / majorVersion := 7 ThisBuild / isPublicArtefact := true @@ -25,7 +25,6 @@ lazy val library = (project in file(".")) // empty artefact, exists to ensure eviction of previous play-language jar which has now moved into play-language-play-28 lazy val playLanguage = Project("play-language", file("play-language")) - .settings(crossScalaVersions := Seq(scala2_12, scala2_13)) def copySources(module: Project) = Seq( Compile / scalaSource := (module / Compile / scalaSource).value, @@ -41,7 +40,6 @@ lazy val playLanguagePlay28 = Project("play-language-play-28", file("play-langua .disablePlugins(JUnitXmlReportPlugin) //Required to prevent https://github.com/scalatest/scalatest/issues/1427 .settings(copySources(playLanguagePlay30)) .settings( - crossScalaVersions := Seq(scala2_12, scala2_13), libraryDependencies ++= AppDependencies.play28 ) .settings( @@ -60,7 +58,6 @@ lazy val playLanguagePlay29 = Project("play-language-play-29", file("play-langua .disablePlugins(JUnitXmlReportPlugin) //Required to prevent https://github.com/scalatest/scalatest/issues/1427 .settings(copySources(playLanguagePlay30)) .settings( - crossScalaVersions := Seq(scala2_13), libraryDependencies ++= AppDependencies.play29 ) .settings( @@ -77,7 +74,7 @@ lazy val playLanguagePlay30 = Project("play-language-play-30", file("play-langua .enablePlugins(SbtTwirl) .disablePlugins(JUnitXmlReportPlugin) //Required to prevent https://github.com/scalatest/scalatest/issues/1427 .settings( - crossScalaVersions := Seq(scala2_13), + crossScalaVersions := Seq(scala2_13, scala3), libraryDependencies ++= AppDependencies.play30 ) .settings( diff --git a/project/AppDependencies.scala b/project/AppDependencies.scala index 6e415a7..8b76c5b 100644 --- a/project/AppDependencies.scala +++ b/project/AppDependencies.scala @@ -31,9 +31,9 @@ object AppDependencies { private def playVersion(playSuffix: String) = playSuffix match { - case "play-28" => "2.8.20" - case "play-29" => "2.9.0" - case "play-30" => "3.0.0" + case "play-28" => "2.8.21" + case "play-29" => "2.9.3" + case "play-30" => "3.0.3" } private def playOrg(playSuffix: String): String = @@ -46,8 +46,8 @@ object AppDependencies { private def scalaTestPlusPlayVersion(playSuffix: String): String = playSuffix match { case "play-28" => "5.1.0" - case "play-29" => "6.0.0" - case "play-30" => "7.0.0" + case "play-29" => "6.0.1" + case "play-30" => "7.0.1" } private def flexmarkAllVersion(playSuffix: String): String = diff --git a/project/build.properties b/project/build.properties index e8a1e24..04267b1 100644 --- a/project/build.properties +++ b/project/build.properties @@ -1 +1 @@ -sbt.version=1.9.7 +sbt.version=1.9.9 diff --git a/project/plugins.sbt b/project/plugins.sbt index 11a293f..7f77648 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -3,7 +3,7 @@ resolvers += Resolver.url("HMRC-open-artefacts-ivy2", url("https://open.artefact Resolver.ivyStylePatterns ) -addSbtPlugin("uk.gov.hmrc" % "sbt-auto-build" % "3.15.0") +addSbtPlugin("uk.gov.hmrc" % "sbt-auto-build" % "3.21.0") addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.4.0") sys.env.get("PLAY_VERSION") match { From b3cea3c63d5c4b1e6474d383cfda2120904810d1 Mon Sep 17 00:00:00 2001 From: "david.ellam" Date: Thu, 30 May 2024 15:26:17 +0100 Subject: [PATCH 2/2] PLATUI-3084 bump sbt-auto-build --- build.sbt | 1 - project/plugins.sbt | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/build.sbt b/build.sbt index 34217e0..53192dc 100644 --- a/build.sbt +++ b/build.sbt @@ -1,5 +1,4 @@ import sbt.Keys._ -import scala.collection.JavaConverters._ val scala2_13 = "2.13.12" val scala3 = "3.3.3" diff --git a/project/plugins.sbt b/project/plugins.sbt index 7f77648..7dadc5d 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -3,7 +3,7 @@ resolvers += Resolver.url("HMRC-open-artefacts-ivy2", url("https://open.artefact Resolver.ivyStylePatterns ) -addSbtPlugin("uk.gov.hmrc" % "sbt-auto-build" % "3.21.0") +addSbtPlugin("uk.gov.hmrc" % "sbt-auto-build" % "3.22.0") addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.4.0") sys.env.get("PLAY_VERSION") match {