Skip to content

Commit

Permalink
Merge pull request #49 from hmrc/BDOG-3112
Browse files Browse the repository at this point in the history
BDOG-3112 Build for Scala 3 and drop Scala 2.12
  • Loading branch information
ellamdav authored May 31, 2024
2 parents c7eb544 + b3cea3c commit db70ede
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 13 deletions.
8 changes: 2 additions & 6 deletions build.sbt
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
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
Expand All @@ -25,7 +24,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,
Expand All @@ -41,7 +39,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(
Expand All @@ -60,7 +57,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(
Expand All @@ -77,7 +73,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(
Expand Down
10 changes: 5 additions & 5 deletions project/AppDependencies.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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 =
Expand All @@ -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 =
Expand Down
2 changes: 1 addition & 1 deletion project/build.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
sbt.version=1.9.7
sbt.version=1.9.9
2 changes: 1 addition & 1 deletion project/plugins.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -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.22.0")
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.4.0")

sys.env.get("PLAY_VERSION") match {
Expand Down

0 comments on commit db70ede

Please sign in to comment.