Skip to content

Commit d7d4896

Browse files
authored
Merge pull request #169 from mdsol/tech/MCC-1326235/UpdateDependenciesP2
tech/MCC-1326235/update_dependencies
2 parents 69b26f5 + d900957 commit d7d4896

File tree

9 files changed

+69
-37
lines changed

9 files changed

+69
-37
lines changed

modules/mauth-authenticator-scala/src/test/scala/com/mdsol/mauth/MauthProtocolSuiteSpec.scala

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ class MauthProtocolSuiteSpec extends AnyFlatSpec with BeforeAndAfterAll with Mat
2424

2525
behavior of "MauthProtocolSuiteSpec"
2626

27-
val signingConfig = ProtocolTestSuiteHelper.SIGNING_CONFIG
27+
lazy val signingConfig: SigningConfig = ProtocolTestSuiteHelper.SIGNING_CONFIG
2828
if (signingConfig == null) {
2929
fail("Signing Configuration is not available.")
3030
}
@@ -33,13 +33,13 @@ class MauthProtocolSuiteSpec extends AnyFlatSpec with BeforeAndAfterAll with Mat
3333
fail("Public Key is not available.")
3434
}
3535

36-
val publicKey = MAuthKeysHelper.getPublicKeyFromString(ProtocolTestSuiteHelper.PUBLIC_KEY)
37-
val uuid = UUID.fromString(signingConfig.getAppUuid)
38-
val privateKey = getPrivateKeyFromString(signingConfig.getPrivateKey)
36+
private val publicKey = MAuthKeysHelper.getPublicKeyFromString(ProtocolTestSuiteHelper.PUBLIC_KEY)
37+
private val uuid = UUID.fromString(signingConfig.getAppUuid)
38+
private val privateKey = getPrivateKeyFromString(signingConfig.getPrivateKey)
3939
val mAuthSigner = new DefaultSigner(uuid, privateKey, mockEpochTimeProvider, java.util.Arrays.asList(MAuthVersion.MWSV2))
4040

4141
// run the tests
42-
val testSpecifications = ProtocolTestSuiteHelper.TEST_SPECIFICATIONS
42+
private val testSpecifications = ProtocolTestSuiteHelper.TEST_SPECIFICATIONS
4343
testSpecifications.foreach { testSpec =>
4444
testSpec.getType match {
4545
case CaseType.AUTHENTICATION_ONLY =>

modules/mauth-authenticator-scala/src/test/scala/com/mdsol/mauth/RequestAuthenticatorBaseSpec.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import java.nio.charset.StandardCharsets
44

55
import com.mdsol.mauth.test.utils.FakeMAuthServer.EXISTING_CLIENT_APP_UUID
66
import com.mdsol.mauth.test.utils.TestFixtures
7-
import org.apache.http.client.methods.{HttpGet, HttpPost}
7+
import org.apache.hc.client5.http.classic.methods.{HttpGet, HttpPost}
88

99
trait RequestAuthenticatorBaseSpec {
1010

modules/mauth-signer-akka-http/src/test/scala/com/mdsol/mauth/MAuthRequestAkkaSignerSpec.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import com.mdsol.mauth.http.Implicits._
1414
import com.mdsol.mauth.models.{UnsignedRequest => NewUnsignedRequest}
1515
import com.mdsol.mauth.test.utils.TestFixtures._
1616
import com.mdsol.mauth.util.EpochTimeProvider
17-
import org.apache.http.HttpStatus
17+
import org.apache.hc.core5.http.HttpStatus
1818
import org.bouncycastle.jce.provider.BouncyCastleProvider
1919
import org.scalatest.BeforeAndAfterAll
2020
import org.scalatest.concurrent.PatienceConfiguration.Timeout

modules/mauth-signer-http4s-022/src/main/scala/com/mdsol/mauth/http4s022/client/MAuthSigner.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ import com.mdsol.mauth.RequestSigner
66
import com.mdsol.mauth.models.UnsignedRequest
77
import org.http4s.Request
88
import org.http4s.client.Client
9-
9+
import org.http4s.EntityDecoder.byteArrayDecoder
1010
import java.net.URI
1111

1212
object MAuthSigner {
13-
def apply[F[_]: Sync](signer: RequestSigner)(client: Client[F]): Client[F] =
13+
def apply[F[_]: Concurrent](signer: RequestSigner)(client: Client[F]): Client[F] =
1414
Client { req =>
1515
for {
1616
req <- Resource.eval(req.as[Array[Byte]].flatMap { byteArray =>

modules/mauth-test-utils/src/main/java/com/mdsol/mauth/test/utils/FakeMAuthServer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import com.github.tomakehurst.wiremock.WireMockServer;
55
import com.github.tomakehurst.wiremock.client.WireMock;
66
import com.github.tomakehurst.wiremock.core.WireMockConfiguration;
7-
import org.apache.http.HttpHeaders;
7+
import org.apache.hc.core5.http.HttpHeaders;
88

99
import java.io.IOException;
1010
import java.util.UUID;

project/BuildSettings.scala

Lines changed: 39 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
import java.util
22

3-
import sbt.Keys._
4-
import sbt._
3+
import sbt.Keys.*
4+
import sbt.*
55

66
object BuildSettings {
77
val env: util.Map[String, String] = System.getenv()
88
val scala212 = "2.12.20"
9-
val scala213 = "2.13.15"
9+
val scala213 = "2.13.16"
1010

1111
lazy val basicSettings = Seq(
1212
homepage := Some(new URI("https://github.com/mdsol/mauth-jvm-clients").toURL),
@@ -20,18 +20,50 @@ object BuildSettings {
2020
// Avoid issues such as java.lang.IllegalAccessError: tried to access method org.bouncycastle.jcajce.provider.asymmetric.rsa.BCRSAPublicKey
2121
// By running tests in a separate JVM
2222
Test / fork := true,
23-
scalacOptions ++= Seq(
23+
Compile / scalacOptions ++= List(
2424
// We deprecated many MAuth v1 methods, and we want to the deprecation warnings
2525
// for existing tests
2626
"-Wconf:msg=.*(Uns|S)ignedRequest|signRequest|(decrypt|encrypt)Signature|" +
2727
"generateRequestHeaders|extract(MwsTime|MAuth)Header|" +
28-
"generateDigestedMessageV1|generateUnencryptedSignature:s"
29-
),
28+
"generateDigestedMessageV1|generateUnencryptedSignature:s",
29+
"-Wconf:msg=type Seq in package scala has changed semantics:s",
30+
"-Wconf:msg=type IndexedSeq in package scala has changed semantics:s",
31+
"-Wconf:msg=constructor modifiers are assumed by synthetic:s",
32+
"-Wconf:msg=access modifiers for `copy` method are copied from the case class constructor under:s",
33+
"-Wconf:msg=access modifiers for `apply` method are copied from the case class constructor under:s",
34+
"-Wconf:msg=which is not part of the implicit scope in Scala 3:s",
35+
"-Wconf:msg=Synthetic case companion used as a function.:s",
36+
"-Wconf:cat=deprecation:s"
37+
) ++ (CrossVersion.partialVersion(scalaVersion.value) match {
38+
case Some((2, n)) if n >= 13 =>
39+
List(
40+
"-Wnonunit-statement"
41+
// other scalac options for 2.13+
42+
)
43+
case _ =>
44+
List(
45+
)
46+
}), // Stop these being errors, they are fine.
47+
Test / scalacOptions ++=
48+
List(
49+
"-Xlint:unused",
50+
"-Wconf:msg=unused value of type.*:s",
51+
"-Wconf:cat=unused:s"
52+
) ++ (CrossVersion.partialVersion(scalaVersion.value) match {
53+
case Some((2, n)) if n >= 13 =>
54+
List(
55+
"-Wnonunit-statement"
56+
// other scalac options for 2.13+
57+
)
58+
case _ =>
59+
List(
60+
)
61+
}),
3062
scalacOptions --= {
3163
if (sys.env.contains("CI"))
3264
Seq.empty
3365
else
34-
Seq("-Xfatal-warnings")
66+
Seq("-Xfatal-warnings", "-Xlint:unused")
3567
}
3668
)
3769

project/Dependencies.scala

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -6,38 +6,38 @@ object Dependencies extends DependencyUtils {
66
// Careful with upgrading akka due to license change https://www.lightbend.com/blog/why-we-are-changing-the-license-for-akka
77
val akka: String = "2.6.20" // Do not update beyond 2.6.* due to license changes
88
val akkaHttp: String = "10.2.10" // Do not update beyond 10.2.* due to license changes
9-
val logback = "1.5.6"
10-
val sttp = "3.10.2"
11-
val http4s = "0.23.29"
12-
val enumeratum = "1.7.4"
9+
val logback = "1.5.16"
10+
val sttp = "3.10.3"
11+
val http4s = "0.23.30"
12+
val enumeratum = "1.7.5"
1313
val log4cats = "2.7.0"
14-
val circe = "0.14.9"
15-
val circeGenericExtras = "0.14.3"
14+
val circe = "0.14.10"
15+
val circeGenericExtras = "0.14.4"
1616
val http4s022 = "0.22.15"
1717
}
1818

1919
val akkaHttp: ModuleID = "com.typesafe.akka" %% "akka-http" % Version.akkaHttp
2020
val akkaHttpCache: ModuleID = "com.typesafe.akka" %% "akka-http-caching" % Version.akkaHttp
2121
val akkaStream: ModuleID = "com.typesafe.akka" %% "akka-stream" % Version.akka
2222
val apacheHttpClient: ModuleID = "org.apache.httpcomponents" % "httpclient" % "4.5.14"
23-
val bouncyCastlePkix: ModuleID = "org.bouncycastle" % "bcpkix-jdk18on" % "1.78.1"
24-
val commonsCodec: ModuleID = "commons-codec" % "commons-codec" % "1.17.0"
25-
val commonsLang3: ModuleID = "org.apache.commons" % "commons-lang3" % "3.14.0"
23+
val bouncyCastlePkix: ModuleID = "org.bouncycastle" % "bcpkix-jdk18on" % "1.80"
24+
val commonsCodec: ModuleID = "commons-codec" % "commons-codec" % "1.18.0"
25+
val commonsLang3: ModuleID = "org.apache.commons" % "commons-lang3" % "3.17.0"
2626
val guava: ModuleID = "com.google.guava" % "guava" % "31.1-jre"
27-
val jacksonDataBind: ModuleID = "com.fasterxml.jackson.core" % "jackson-databind" % "2.17.0"
27+
val jacksonDataBind: ModuleID = "com.fasterxml.jackson.core" % "jackson-databind" % "2.18.2"
2828
val logbackClassic: ModuleID = "ch.qos.logback" % "logback-classic" % Version.logback
2929
val logbackCore: ModuleID = "ch.qos.logback" % "logback-core" % Version.logback
30-
val slf4jApi: ModuleID = "org.slf4j" % "slf4j-api" % "2.0.12"
30+
val slf4jApi: ModuleID = "org.slf4j" % "slf4j-api" % "2.0.16"
3131
val typeSafeConfig: ModuleID = "com.typesafe" % "config" % "1.4.3"
3232
val scalaCacheCore: ModuleID = "com.github.cb372" %% "scalacache-core" % "1.0.0-M6"
3333
val scalaLogging: ModuleID = "com.typesafe.scala-logging" %% "scala-logging" % "3.9.5"
34-
val catsEffect: ModuleID = "org.typelevel" %% "cats-effect" % "3.4.8"
34+
val catsEffect: ModuleID = "org.typelevel" %% "cats-effect" % "3.5.7"
3535
val sttp: ModuleID = "com.softwaremill.sttp.client3" %% "core" % Version.sttp
3636
val sttpAkkaHttpBackend: ModuleID = "com.softwaremill.sttp.client3" %% "akka-http-backend" % Version.sttp
3737
val sttpHttp4sHttpBackend: ModuleID = "com.softwaremill.sttp.client3" %% "http4s-backend" % Version.sttp
3838
val sttpFs2: ModuleID = "com.softwaremill.sttp.shared" %% "fs2" % "1.4.2"
39-
val scalaLibCompat: ModuleID = "org.scala-lang.modules" %% "scala-collection-compat" % "2.12.0"
40-
val caffeine: ModuleID = "com.github.ben-manes.caffeine" % "caffeine" % "3.1.8"
39+
val scalaLibCompat: ModuleID = "org.scala-lang.modules" %% "scala-collection-compat" % "2.13.0"
40+
val caffeine: ModuleID = "com.github.ben-manes.caffeine" % "caffeine" % "3.2.0"
4141
val http4sDsl: ModuleID = "org.http4s" %% "http4s-dsl" % Version.http4s
4242
val http4sDsl022: ModuleID = "org.http4s" %% "http4s-dsl" % Version.http4s022
4343
val http4sClient: ModuleID = "org.http4s" %% "http4s-client" % Version.http4s
@@ -59,10 +59,10 @@ object Dependencies extends DependencyUtils {
5959
"com.typesafe.akka" %% "akka-testkit" % Version.akka,
6060
"com.typesafe.akka" %% "akka-stream-testkit" % Version.akka
6161
)
62-
val commonsIO: ModuleID = "commons-io" % "commons-io" % "2.16.1"
63-
val scalaMock: ModuleID = "org.scalamock" %% "scalamock" % "5.2.0"
62+
val commonsIO: ModuleID = "commons-io" % "commons-io" % "2.18.0"
63+
val scalaMock: ModuleID = "org.scalamock" %% "scalamock" % "6.2.0"
6464
val scalaTest: ModuleID = "org.scalatest" %% "scalatest" % "3.2.19"
65-
val wiremock: ModuleID = "com.github.tomakehurst" % "wiremock" % "2.27.2"
65+
val wiremock: ModuleID = "com.github.tomakehurst" % "wiremock" % "3.0.1"
6666
val munitCatsEffect: ModuleID = "org.typelevel" %% "munit-cats-effect-3" % "1.0.7"
6767
val munitCatsEffect2: ModuleID = "org.typelevel" %% "munit-cats-effect-2" % "1.0.7"
6868
val log4catsNoop: ModuleID = "org.typelevel" %% "log4cats-noop" % Version.log4cats

project/build.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
# suppress inspection "UnusedProperty"
2-
sbt.version =1.10.0
2+
sbt.version =1.10.7

project/plugins.sbt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.5.12")
22
addSbtPlugin("com.mintbeans" % "sbt-ecr" % "0.15.0")
3-
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.4.2")
3+
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.5.2")
44
addSbtPlugin("se.marcuslonnberg" % "sbt-docker" % "1.8.2")
5-
addSbtPlugin("io.github.davidgregory084" % "sbt-tpolecat" % "0.1.17")
5+
addSbtPlugin("io.github.davidgregory084" % "sbt-tpolecat" % "0.4.4")

0 commit comments

Comments
 (0)