Skip to content

Commit

Permalink
Merge pull request #91 from hmrc/DDCYLS-5072
Browse files Browse the repository at this point in the history
play 3.0 upgrade
  • Loading branch information
tapiwa-tiyemba authored Apr 19, 2024
2 parents b63d7f5 + ec9fec6 commit e443801
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 58 deletions.
7 changes: 2 additions & 5 deletions build.sbt
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import uk.gov.hmrc.sbtdistributables.SbtDistributablesPlugin.publishingSettings

val appName = "vat-service-guide"

Expand All @@ -8,8 +7,6 @@ lazy val microservice = Project(appName, file("."))
libraryDependencies ++= AppDependencies.compile ++ AppDependencies.test,
evictionWarningOptions in update := EvictionWarningOptions.default.withWarnScalaVersionEviction(false),
majorVersion := 0,
scalaVersion := "2.13.10"
)
.settings(
publishingSettings: _*
scalaVersion := "2.13.13"
)

39 changes: 0 additions & 39 deletions conf/application.conf
Original file line number Diff line number Diff line change
Expand Up @@ -20,28 +20,10 @@ include "frontend.conf"
appName=vat-service-guide
appUrl="http://"${appName}".local"

# An ApplicationLoader that uses Guice to bootstrap the application.
play.application.loader = "uk.gov.hmrc.play.bootstrap.ApplicationLoader"

# Primary entry point for all HTTP requests on Play applications
play.http.requestHandler = "uk.gov.hmrc.play.bootstrap.http.RequestHandler"

# Provides an implementation of AuditConnector. Use `uk.gov.hmrc.play.audit.AuditModule` or create your own.
# An audit connector must be provided.
play.modules.enabled += "uk.gov.hmrc.play.audit.AuditModule"

# Provides an implementation of MetricsFilter. Use `uk.gov.hmrc.play.graphite.GraphiteMetricsModule` or create your own.
# A metric filter must be provided
play.modules.enabled += "uk.gov.hmrc.play.bootstrap.graphite.GraphiteMetricsModule"

# Play Modules
# ~~~~
# Additional play modules can be added here

# Provides an implementation and configures all filters required by a Platform frontend microservice.
play.modules.enabled += "uk.gov.hmrc.play.bootstrap.frontend.FrontendModule"
play.http.filters = "uk.gov.hmrc.play.bootstrap.frontend.filters.FrontendFilters"

# Session Timeout
# ~~~~
# The default session timeout for the app is 15 minutes (900seconds).
Expand Down Expand Up @@ -71,26 +53,5 @@ play.filters.headers.contentSecurityPolicy= "default-src 'unsafe-inline' 'self'
# !!!WARNING!!! DO NOT CHANGE THIS ROUTER
play.http.router=prod.Routes

# Metrics plugin settings - graphite reporting is configured on a per env basis
metrics {
name = ${appName}
rateUnit = SECONDS
durationUnit = SECONDS
showSamples = true
jvm = true
enabled = true
}


# Microservice specific config

auditing {
enabled=false
traceRequests=true
consumer {
baseUri {
host = localhost
port = 8100
}
}
}
12 changes: 5 additions & 7 deletions project/AppDependencies.scala
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,15 @@ import play.sbt.PlayImport._
import sbt._

object AppDependencies {
val bootStrapPlayVersion = "7.8.0"
val bootStrapPlayVersion = "8.5.0"

val compile: Seq[ModuleID] = Seq(
ws,
"uk.gov.hmrc" %% "bootstrap-frontend-play-28" % bootStrapPlayVersion,
"uk.gov.hmrc" %% "bootstrap-frontend-play-30" % bootStrapPlayVersion,
)

val test: Seq[ModuleID] = Seq(
"uk.gov.hmrc" %% "bootstrap-test-play-28" % bootStrapPlayVersion % "test",
"org.pegdown" % "pegdown" % "1.6.0" % "test",
"com.vladsch.flexmark" % "flexmark-profile-pegdown" % "0.62.2" % "test",
"org.scalatest" %% "scalatest" % "3.2.11" % "test"
)
"uk.gov.hmrc" %% "bootstrap-test-play-30" % bootStrapPlayVersion,
"com.vladsch.flexmark" % "flexmark-profile-pegdown" % "0.64.8",
).map(_ % Test)
}
2 changes: 1 addition & 1 deletion project/build.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
sbt.version=1.7.2
sbt.version=1.9.7
9 changes: 4 additions & 5 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@ resolvers ++= Seq(
Resolver.url("HMRC-open-artefacts-ivy", url("https://open.artefacts.tax.service.gov.uk/ivy2"))(Resolver.ivyStylePatterns),
"HMRC-open-artefacts-maven" at "https://open.artefacts.tax.service.gov.uk/maven2")

addSbtPlugin("uk.gov.hmrc" % "sbt-auto-build" % "3.9.0")
addSbtPlugin("uk.gov.hmrc" % "sbt-distributables" % "2.2.0")
addSbtPlugin("com.typesafe.play" % "sbt-plugin" % "2.8.18")
addSbtPlugin("org.scalastyle" %% "scalastyle-sbt-plugin" % "1.0.0")
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.4.6")
addSbtPlugin("uk.gov.hmrc" % "sbt-auto-build" % "3.21.0")
addSbtPlugin("uk.gov.hmrc" % "sbt-distributables" % "2.5.0")
addSbtPlugin("org.playframework" % "sbt-plugin" % "3.0.2")
addSbtPlugin("org.scalastyle" %% "scalastyle-sbt-plugin" % "1.0.0" exclude("org.scala-lang.modules", "scala-xml_2.12"))
addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.10.2")
13 changes: 12 additions & 1 deletion test/BuildSpec.scala
Original file line number Diff line number Diff line change
@@ -1,6 +1,17 @@
/*
* Copyright 2023 HM Revenue & Customs
* Copyright 2024 HM Revenue & Customs
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

import org.scalatest.matchers.should.Matchers
Expand Down

0 comments on commit e443801

Please sign in to comment.