From fc915ecc06538610bdf8fd2e3c3910616aab0dfc Mon Sep 17 00:00:00 2001 From: petekirby-ee Date: Fri, 2 Feb 2024 15:56:12 +0000 Subject: [PATCH] APIS-6747 Upgrade to Play 3.0 (#46) * APIS-6747 Upgrade to Play 3.0 * APIS-6747 Upgrade to Play 3.0 --- conf/prod.routes | 2 -- it/PlatformIntegrationSpec.scala | 11 +++++++---- project/AppDependencies.scala | 7 +++---- project/plugins.sbt | 6 +++--- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/conf/prod.routes b/conf/prod.routes index c445ba5..ece2753 100644 --- a/conf/prod.routes +++ b/conf/prod.routes @@ -3,5 +3,3 @@ -> / app.Routes -> / health.Routes -> / definition.Routes - -GET /admin/metrics @com.kenshoo.play.metrics.MetricsController.metrics diff --git a/it/PlatformIntegrationSpec.scala b/it/PlatformIntegrationSpec.scala index d082e1e..cf834c7 100644 --- a/it/PlatformIntegrationSpec.scala +++ b/it/PlatformIntegrationSpec.scala @@ -15,16 +15,19 @@ */ import com.github.tomakehurst.wiremock.client.WireMock._ +import org.apache.pekko.stream.Materializer import org.scalatestplus.play.guice.GuiceOneAppPerTest +import org.scalatest.TestData + import play.api.{Application, Mode} import play.api.http.Status.{NO_CONTENT, OK} import play.api.inject.guice.GuiceApplicationBuilder import play.api.test.FakeRequest import play.api.test.Helpers.{contentAsJson, contentAsString, status} + import uk.gov.hmrc.hello.controllers.DocumentationController import uk.gov.hmrc.hello.common.utils.AsyncHmrcSpec import uk.gov.hmrc.hello.common.utils.WireMockSugar -import org.scalatest.TestData class PlatformIntegrationSpec extends AsyncHmrcSpec with GuiceOneAppPerTest with WireMockSugar { @@ -40,9 +43,9 @@ class PlatformIntegrationSpec extends AsyncHmrcSpec with GuiceOneAppPerTest with .in(Mode.Test).build() trait Setup { - implicit def mat: akka.stream.Materializer = app.injector.instanceOf[akka.stream.Materializer] - val documentationController = app.injector.instanceOf[DocumentationController] - val request = FakeRequest() + implicit def mat: Materializer = app.injector.instanceOf[Materializer] + val documentationController = app.injector.instanceOf[DocumentationController] + val request = FakeRequest() stubFor(post(urlMatching("http://localhost:11112/registration")).willReturn(aResponse().withStatus(NO_CONTENT))) } diff --git a/project/AppDependencies.scala b/project/AppDependencies.scala index f100a52..b10c243 100644 --- a/project/AppDependencies.scala +++ b/project/AppDependencies.scala @@ -2,15 +2,14 @@ import play.core.PlayVersion import sbt._ object AppDependencies { - val bootStrapVersion = "7.19.0" + val bootStrapVersion = "8.4.0" lazy val dependencies = Seq( - "uk.gov.hmrc" %% "bootstrap-backend-play-28" % bootStrapVersion + "uk.gov.hmrc" %% "bootstrap-backend-play-30" % bootStrapVersion ) def testDependencies(scope: String) = Seq( - "uk.gov.hmrc" %% "bootstrap-test-play-28" % bootStrapVersion, - "com.vladsch.flexmark" % "flexmark-all" % "0.36.8", + "uk.gov.hmrc" %% "bootstrap-test-play-30" % bootStrapVersion, "org.scalaj" %% "scalaj-http" % "2.4.2", "com.github.tomakehurst" % "wiremock-jre8-standalone" % "2.35.0", "org.mockito" %% "mockito-scala-scalatest" % "1.17.29", diff --git a/project/plugins.sbt b/project/plugins.sbt index 17be74d..8c49b51 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1,9 +1,9 @@ resolvers += "HMRC-open-artefacts-maven" at "https://open.artefacts.tax.service.gov.uk/maven2" resolvers += Resolver.url("HMRC-open-artefacts-ivy", url("https://open.artefacts.tax.service.gov.uk/ivy2"))(Resolver.ivyStylePatterns) -addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.8.19") -addSbtPlugin("uk.gov.hmrc" % "sbt-auto-build" % "3.18.0") -addSbtPlugin("uk.gov.hmrc" % "sbt-distributables" % "2.4.0") +addSbtPlugin("org.playframework" % "sbt-plugin" % "3.0.1") +addSbtPlugin("uk.gov.hmrc" % "sbt-auto-build" % "3.20.0") +addSbtPlugin("uk.gov.hmrc" % "sbt-distributables" % "2.5.0") addSbtPlugin("org.scoverage" % "sbt-scoverage" % "2.0.9") addSbtPlugin("org.scalastyle" %% "scalastyle-sbt-plugin" % "1.0.0") addSbtPlugin("ch.epfl.scala" % "sbt-bloop" % "1.5.11")