Skip to content

Commit

Permalink
Merge pull request #166 from hmrc/update
Browse files Browse the repository at this point in the history
Drop Play 2.8
  • Loading branch information
colin-lamed authored Feb 14, 2025
2 parents 4ae1a5d + 827defb commit 33c7d22
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 249 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
### Version 15.2.0

Drops support for Play 2.8

### Version 15.0.0

- Built for Scala 3 in addition to 2.13.
Expand Down
31 changes: 2 additions & 29 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import sbt._
// https://www.scala-sbt.org/1.x/docs/Parallel-Execution.html
Global / concurrentRestrictions += Tags.limitSum(1, Tags.Test, Tags.Untagged)

val scala2_13 = "2.13.12"
val scala3 = "3.3.4"
val scala2_13 = "2.13.16"
val scala3 = "3.3.5"

ThisBuild / majorVersion := 15
ThisBuild / scalaVersion := scala2_13
Expand All @@ -20,7 +20,6 @@ lazy val library = (project in file("."))
crossScalaVersions := Seq.empty
)
.aggregate(
httpVerbsPlay28, httpVerbsTestPlay28,
httpVerbsPlay29, httpVerbsTestPlay29,
httpVerbsPlay30, httpVerbsTestPlay30
)
Expand All @@ -33,23 +32,6 @@ def copyPlay30Sources(module: Project) =
transformResource = _.replace("pekko", "akka")
)

lazy val httpVerbsPlay28 = Project("http-verbs-play-28", file("http-verbs-play-28"))
.enablePlugins(BuildInfoPlugin)
.settings(
copyPlay30Sources(httpVerbsPlay30),
crossScalaVersions := Seq(scala2_13),
libraryDependencies ++=
LibDependencies.coreCompileCommon(scalaVersion.value) ++
LibDependencies.coreCompilePlay28 ++
LibDependencies.coreTestCommon ++
LibDependencies.coreTestPlay28,
Test / fork := true // akka is not unloaded properly, which can affect other tests
)
.settings( // https://github.com/sbt/sbt-buildinfo
buildInfoKeys := Seq[BuildInfoKey](version),
buildInfoPackage := "uk.gov.hmrc.http"
)

lazy val httpVerbsPlay29 = Project("http-verbs-play-29", file("http-verbs-play-29"))
.enablePlugins(BuildInfoPlugin)
.settings(
Expand Down Expand Up @@ -83,15 +65,6 @@ lazy val httpVerbsPlay30 = Project("http-verbs-play-30", file("http-verbs-play-3
buildInfoPackage := "uk.gov.hmrc.http"
)

lazy val httpVerbsTestPlay28 = Project("http-verbs-test-play-28", file("http-verbs-test-play-28"))
.settings(
copyPlay30Sources(httpVerbsTestPlay30),
crossScalaVersions := Seq(scala2_13),
libraryDependencies ++= LibDependencies.testCompilePlay28,
Test / fork := true // required to look up wiremock resources
)
.dependsOn(httpVerbsPlay28)

lazy val httpVerbsTestPlay29 = Project("http-verbs-test-play-29", file("http-verbs-test-play-29"))
.settings(
copyPlay30Sources(httpVerbsTestPlay30),
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

31 changes: 2 additions & 29 deletions project/LibDependencies.scala
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,14 @@ import sbt._

object LibDependencies {

val play28Version = "2.8.22"
val play29Version = "2.9.5"
val play30Version = "3.0.5"
val play29Version = "2.9.6"
val play30Version = "3.0.6"

// Dependencies for http-verbs-common and http-verbs-play-xxx modules
def coreCompileCommon(scalaVersion: String) = Seq(
"com.typesafe" % "config" % "1.4.3",
"com.softwaremill.sttp.model" %% "core" % "1.7.10",
"dev.zio" %% "izumi-reflect" % "2.3.8"
) ++
(CrossVersion.partialVersion(scalaVersion) match {
case Some((2, 12)) => // empty http-core added to force eviction
// as classes from this lib have been inlined in http-verbs
Seq("uk.gov.hmrc" %% "http-core" % "2.5.0")
case _ => Seq.empty
})

val coreCompilePlay28 = Seq(
"com.typesafe.play" %% "play-json" % "2.8.2", // version provided by play28Version
"org.slf4j" % "slf4j-api" % "1.7.30",
"com.typesafe.play" %% "play-ahc-ws" % play28Version
)

val coreCompilePlay29 = Seq(
Expand All @@ -44,13 +31,6 @@ object LibDependencies {
"org.scalatestplus" %% "mockito-4-11" % "3.2.17.0" % Test
)

val coreTestPlay28 = Seq(
"com.typesafe.play" %% "play-test" % play28Version % Test,
"ch.qos.logback" % "logback-classic" % "1.2.12" % Test, // should already provided by play-test, why does it fail without it?
"com.github.tomakehurst" % "wiremock-jre8" % "2.27.2" % Test,
"org.slf4j" % "slf4j-simple" % "1.7.30" % Test
)

val coreTestPlay29 = Seq(
"com.typesafe.play" %% "play-test" % play29Version % Test,
"ch.qos.logback" % "logback-classic" % "1.4.11" % Test, // should already provided by play-test, why does it fail without it?
Expand All @@ -65,13 +45,6 @@ object LibDependencies {
"org.slf4j" % "slf4j-simple" % "2.0.7" % Test
)

val testCompilePlay28 = Seq(
"org.scalatest" %% "scalatest" % "3.1.1", // version provided transitively is chosen for compatibility with scalatestplus-play
"com.github.tomakehurst" % "wiremock-jre8" % "2.27.2", // last version with jackson dependencies compatible with play
"org.scalatest" %% "scalatest" % "3.2.17" % Test,
"com.vladsch.flexmark" % "flexmark-all" % "0.64.8" % Test
)

val testCompilePlay29 = Seq(
"org.scalatest" %% "scalatest" % "3.2.17", // version provided transitively is chosen for compatibility with scalatestplus-play
"com.github.tomakehurst" % "wiremock" % "3.0.0-beta-7", // last version with jackson dependencies compatible with play
Expand Down
2 changes: 1 addition & 1 deletion project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
resolvers += MavenRepository("HMRC-open-artefacts-maven2", "https://open.artefacts.tax.service.gov.uk/maven2")
resolvers += Resolver.url("HMRC-open-artefacts-ivy2", url("https://open.artefacts.tax.service.gov.uk/ivy2"))(Resolver.ivyStylePatterns)

addSbtPlugin("uk.gov.hmrc" % "sbt-auto-build" % "3.22.0")
addSbtPlugin("uk.gov.hmrc" % "sbt-auto-build" % "3.24.0")

0 comments on commit 33c7d22

Please sign in to comment.