Skip to content

Commit

Permalink
Merge pull request #164 from hmrc/update
Browse files Browse the repository at this point in the history
Update dependencie
  • Loading branch information
colin-lamed authored Jul 18, 2024
2 parents 6af33f9 + 132af50 commit 2710cda
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 18 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ httpClient.POST[ResponseType](url, payload, headers)
becomes

```scala
httpClientV2.post(url"$url").withBody(Json.toJson(payload)).addHeaders(headers).execute[ResponseType]
httpClientV2.post(url"$url").withBody(Json.toJson(payload)).setHeader(headers).execute[ResponseType]
```

If you were previously creating multiple HttpClients to configure proxies or change the user-agent, this will no-longer be necessary since these can all be controlled with the HttpClientV2 API per call.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import org.mockito.Mockito.verify
import org.scalatest.BeforeAndAfter
import org.scalatest.concurrent.{IntegrationPatience, ScalaFutures}
import org.scalatest.matchers.should.Matchers
import org.scalatest.wordspec.AnyWordSpecLike
import org.scalatest.wordspec.AnyWordSpec
import org.scalatestplus.mockito.MockitoSugar
import play.api.Configuration
import play.api.libs.json.{Json, Reads, Writes}
Expand All @@ -46,7 +46,7 @@ import scala.concurrent.ExecutionContext.Implicits.global
import scala.util.Random

class HttpClientV2Spec
extends AnyWordSpecLike
extends AnyWordSpec
with Matchers
with WireMockSupport
with ScalaFutures
Expand Down
23 changes: 10 additions & 13 deletions project/LibDependencies.scala
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ import sbt._

object LibDependencies {

val play28Version = "2.8.21"
val play29Version = "2.9.2"
val play30Version = "3.0.2"
val play28Version = "2.8.22"
val play29Version = "2.9.4"
val play30Version = "3.0.4"

// 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.2",
"com.softwaremill.sttp.model" %% "core" % "1.7.10",
"dev.zio" %% "izumi-reflect" % "2.3.8"
) ++
(CrossVersion.partialVersion(scalaVersion) match {
Expand All @@ -26,25 +26,22 @@ object LibDependencies {
)

val coreCompilePlay29 = Seq(
"com.typesafe.play" %% "play-json" % "2.10.4", // version provided by play29Version
"com.typesafe.play" %% "play-json" % "2.10.6", // version provided by play29Version
"org.slf4j" % "slf4j-api" % "2.0.9",
"com.typesafe.play" %% "play-ahc-ws" % play29Version
)

val coreCompilePlay30 = Seq(
"org.playframework" %% "play-json" % "3.0.2", // version provided by play30Version
"org.playframework" %% "play-json" % "3.0.4", // version provided by play30Version
"org.slf4j" % "slf4j-api" % "2.0.9",
"org.playframework" %% "play-ahc-ws" % play30Version
)

def coreTestCommon = Seq(
"org.scalatest" %% "scalatest" % "3.2.17" % Test,
"org.scalatestplus" %% "scalacheck-1-17" % "3.2.17.0" % Test,
"com.vladsch.flexmark" % "flexmark-all" % "0.64.8" % Test,
// mockito-scala is not available for Scala 3 https://github.com/mockito/mockito-scala/issues/364
// use java build + scalatestplus:mockito
"org.scalatestplus" %% "mockito-3-4" % "3.2.10.0" % Test // recommended by play docs https://www.playframework.com/documentation/3.0.x/ScalaTestingWithScalaTest
// or https://mvnrepository.com/artifact/eu.monniot/scala3mock
"org.scalatest" %% "scalatest" % "3.2.17" % Test,
"org.scalatestplus" %% "scalacheck-1-17" % "3.2.17.0" % Test,
"com.vladsch.flexmark" % "flexmark-all" % "0.64.8" % Test,
"org.scalatestplus" %% "mockito-4-11" % "3.2.17.0" % Test
)

val coreTestPlay28 = Seq(
Expand Down
2 changes: 1 addition & 1 deletion project/build.properties
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@
# limitations under the License.
#

sbt.version=1.9.7
sbt.version=1.9.9
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.21.0")
addSbtPlugin("uk.gov.hmrc" % "sbt-auto-build" % "3.22.0")

0 comments on commit 2710cda

Please sign in to comment.