From b09ea0182e965b382b478274b27f5c9f1945e355 Mon Sep 17 00:00:00 2001 From: Sinimol Babu Date: Fri, 20 Sep 2024 13:04:21 +0100 Subject: [PATCH] ADR-1181: library updates, http verb changes and pr bot warning fixes (#17) * ADR-1181 library updates, http verb changes, pr bot warning fixes * ADR-1181 pr bot warning fixes * ADR-1181 pr bot warning fixes --- build.sbt | 2 +- conf/application-json-logger.xml | 11 ----------- conf/application.conf | 2 +- conf/logback.xml | 30 ++++++------------------------ project/AppDependencies.scala | 17 +++++++++-------- project/build.properties | 2 +- project/plugins.sbt | 16 +++++++++------- 7 files changed, 27 insertions(+), 53 deletions(-) delete mode 100755 conf/application-json-logger.xml diff --git a/build.sbt b/build.sbt index 62c0459..0762c23 100755 --- a/build.sbt +++ b/build.sbt @@ -1,7 +1,7 @@ import uk.gov.hmrc.DefaultBuildSettings ThisBuild / majorVersion := 0 -ThisBuild / scalaVersion := "2.13.12" +ThisBuild / scalaVersion := "2.13.14" lazy val microservice = Project("alcohol-duty-calculator", file(".")) .enablePlugins(play.sbt.PlayScala, SbtDistributablesPlugin) diff --git a/conf/application-json-logger.xml b/conf/application-json-logger.xml deleted file mode 100755 index 020356e..0000000 --- a/conf/application-json-logger.xml +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - diff --git a/conf/application.conf b/conf/application.conf index 24f4c44..324a8ed 100755 --- a/conf/application.conf +++ b/conf/application.conf @@ -20,7 +20,7 @@ include "backend.conf" appName = alcohol-duty-calculator # Default http client -play.modules.enabled += "uk.gov.hmrc.play.bootstrap.HttpClientModule" +play.modules.enabled += "uk.gov.hmrc.play.bootstrap.HttpClientV2Module" # Json error handler play.http.errorHandler = "uk.gov.hmrc.play.bootstrap.backend.http.JsonErrorHandler" diff --git a/conf/logback.xml b/conf/logback.xml index 725a710..5ec69ad 100755 --- a/conf/logback.xml +++ b/conf/logback.xml @@ -4,26 +4,17 @@ logs/alcohol-duty-calculator.log - %date{ISO8601} level=[%level] logger=[%logger] thread=[%thread] message=[%message] %replace(exception=[%xException]){'^exception=\[\]$',''}%n + %date{ISO8601} level=[%level] logger=[%logger] thread=[%thread] message=[%message] + %replace(exception=[%xException]){'^exception=\[\]$',''}%n + - %date{ISO8601} level=[%level] logger=[%logger] thread=[%thread] rid=[%X{X-Request-ID}] user=[%X{Authorization}] message=[%message] %replace(exception=[%xException]){'^exception=\[\]$',''}%n - - - - - - %date{ISO8601} level=[%level] logger=[%logger] thread=[%thread] rid=[not-available] user=[not-available] message=[%message] %replace(exception=[%xException]){'^exception=\[\]$',''}%n - - - - - logs/access.log - - %message%n + %date{ISO8601} level=[%level] logger=[%logger] thread=[%thread] rid=[%X{X-Request-ID}] + user=[%X{Authorization}] message=[%message] %replace(exception=[%xException]){'^exception=\[\]$',''}%n + @@ -34,15 +25,6 @@ - - - - - - - - - diff --git a/project/AppDependencies.scala b/project/AppDependencies.scala index 06cc445..710af77 100755 --- a/project/AppDependencies.scala +++ b/project/AppDependencies.scala @@ -2,19 +2,20 @@ import sbt.* object AppDependencies { - private val bootstrapVersion = "8.5.0" + private val bootstrapVersion = "9.4.0" + private val mockitoScalaVersion = "1.17.37" val compile = Seq( - "uk.gov.hmrc" %% "bootstrap-backend-play-30" % bootstrapVersion, - "com.beachape" %% "enumeratum" % "1.7.3", - "com.beachape" %% "enumeratum-play" % "1.8.0" + "uk.gov.hmrc" %% "bootstrap-backend-play-30" % bootstrapVersion, + "com.beachape" %% "enumeratum" % "1.7.4", + "com.beachape" %% "enumeratum-play" % "1.8.1" ) val test = Seq( - "uk.gov.hmrc" %% "bootstrap-test-play-30" % bootstrapVersion % Test, - "org.mockito" %% "mockito-scala" % "1.17.30" % Test, - "org.scalatestplus" %% "scalatestplus-scalacheck" % "3.1.0.0-RC2" % Test, - "org.mockito" %% "mockito-scala-scalatest" % "1.17.30" % Test + "uk.gov.hmrc" %% "bootstrap-test-play-30" % bootstrapVersion % Test, + "org.mockito" %% "mockito-scala" % mockitoScalaVersion % Test, + "org.mockito" %% "mockito-scala-scalatest" % mockitoScalaVersion % Test, + "org.scalatestplus" %% "scalatestplus-scalacheck" % "3.1.0.0-RC2" % Test ) val itDependencies = Seq.empty diff --git a/project/build.properties b/project/build.properties index e8a1e24..04267b1 100755 --- 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 72d9e7b..031a3cd 100755 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1,10 +1,12 @@ 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) +resolvers += Resolver.url("HMRC-open-artefacts-ivy2", url("https://open.artefacts.tax.service.gov.uk/ivy2"))( + Resolver.ivyStylePatterns +) resolvers += Resolver.typesafeRepo("releases") -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.scoverage" % "sbt-scoverage" % "2.0.10") -addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.5.2") -addSbtPlugin("org.scalastyle" %% "scalastyle-sbt-plugin" % "1.0.0" exclude("org.scala-lang.modules", "scala-xml_2.12")) +addSbtPlugin("uk.gov.hmrc" % "sbt-auto-build" % "3.22.0") +addSbtPlugin("uk.gov.hmrc" % "sbt-distributables" % "2.5.0") +addSbtPlugin("org.playframework" % "sbt-plugin" % "3.0.5") +addSbtPlugin("org.scoverage" % "sbt-scoverage" % "2.2.0") +addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.5.2") +addSbtPlugin("org.scalastyle" %% "scalastyle-sbt-plugin" % "1.0.0" exclude ("org.scala-lang.modules", "scala-xml_2.12"))