Skip to content

Commit

Permalink
ADR-1181: library updates, http verb changes and pr bot warning fixes (
Browse files Browse the repository at this point in the history
…#17)

* ADR-1181 library updates, http verb changes, pr bot warning fixes

* ADR-1181 pr bot warning fixes

* ADR-1181 pr bot warning fixes
  • Loading branch information
sini-george authored Sep 20, 2024
1 parent 6600772 commit b09ea01
Show file tree
Hide file tree
Showing 7 changed files with 27 additions and 53 deletions.
2 changes: 1 addition & 1 deletion build.sbt
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
11 changes: 0 additions & 11 deletions conf/application-json-logger.xml

This file was deleted.

2 changes: 1 addition & 1 deletion conf/application.conf
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
30 changes: 6 additions & 24 deletions conf/logback.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,26 +4,17 @@
<appender name="FILE" class="ch.qos.logback.core.FileAppender">
<file>logs/alcohol-duty-calculator.log</file>
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
<pattern>%date{ISO8601} level=[%level] logger=[%logger] thread=[%thread] message=[%message] %replace(exception=[%xException]){'^exception=\[\]$',''}%n</pattern>
<pattern>%date{ISO8601} level=[%level] logger=[%logger] thread=[%thread] message=[%message]
%replace(exception=[%xException]){'^exception=\[\]$',''}%n
</pattern>
</encoder>
</appender>

<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
<pattern>%date{ISO8601} level=[%level] logger=[%logger] thread=[%thread] rid=[%X{X-Request-ID}] user=[%X{Authorization}] message=[%message] %replace(exception=[%xException]){'^exception=\[\]$',''}%n</pattern>
</encoder>
</appender>

<appender name="STDOUT_IGNORE_NETTY" class="ch.qos.logback.core.ConsoleAppender">
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
<pattern>%date{ISO8601} level=[%level] logger=[%logger] thread=[%thread] rid=[not-available] user=[not-available] message=[%message] %replace(exception=[%xException]){'^exception=\[\]$',''}%n</pattern>
</encoder>
</appender>

<appender name="ACCESS_LOG_FILE" class="ch.qos.logback.core.FileAppender">
<file>logs/access.log</file>
<encoder>
<pattern>%message%n</pattern>
<pattern>%date{ISO8601} level=[%level] logger=[%logger] thread=[%thread] rid=[%X{X-Request-ID}]
user=[%X{Authorization}] message=[%message] %replace(exception=[%xException]){'^exception=\[\]$',''}%n
</pattern>
</encoder>
</appender>

Expand All @@ -34,15 +25,6 @@
</encoder>
</appender>


<logger name="accesslog" level="INFO" additivity="false">
<appender-ref ref="ACCESS_LOG_FILE" />
</logger>

<logger name="com.ning.http.client.providers.netty" additivity="false">
<appender-ref ref="STDOUT_IGNORE_NETTY" />
</logger>

<logger name="com.google.inject" level="INFO"/>

<logger name="uk.gov" level="INFO"/>
Expand Down
17 changes: 9 additions & 8 deletions project/AppDependencies.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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
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
16 changes: 9 additions & 7 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -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"))

0 comments on commit b09ea01

Please sign in to comment.