From 96a7d64cd642318f08939676c69a4f418d64d183 Mon Sep 17 00:00:00 2001 From: Grigorii Chudnov Date: Wed, 24 Nov 2021 10:41:10 +0100 Subject: [PATCH] Update Project Dependencies (#197) * update dependencies Signed-off-by: Grigorii Chudnov --- .github/workflows/ci.yml | 6 ++-- .github/workflows/clean.yml | 2 +- .github/workflows/format.yml | 2 +- .scalafmt.conf | 3 +- build.sbt | 32 ++++++++++--------- project/plugins.sbt | 23 +++++-------- .../scala/org/zalando/kanadi/api/Events.scala | 2 -- .../org/zalando/kanadi/api/Registry.scala | 1 - .../zalando/kanadi/api/Subscriptions.scala | 1 - .../org/zalando/kanadi/api/package.scala | 1 - .../scala/org/zalando/kanadi/package.scala | 1 - 11 files changed, 32 insertions(+), 42 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1686994..408631c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -22,7 +22,7 @@ jobs: strategy: matrix: os: [ubuntu-latest] - scala: [2.12.11, 2.13.4] + scala: [2.12.14, 2.13.7] java: [adopt@1.8] runs-on: ${{ matrix.os }} steps: @@ -32,7 +32,7 @@ jobs: fetch-depth: 0 - name: Setup Java and Scala - uses: olafurpg/setup-scala@v12 + uses: olafurpg/setup-scala@v13 with: java-version: ${{ matrix.java }} @@ -71,4 +71,4 @@ jobs: run: sbt ++${{ matrix.scala }} coverageReport coverageAggregate coveralls - name: Shut down Nakadi - run: docker-compose down \ No newline at end of file + run: docker-compose down diff --git a/.github/workflows/clean.yml b/.github/workflows/clean.yml index b535fcc..547aaa4 100644 --- a/.github/workflows/clean.yml +++ b/.github/workflows/clean.yml @@ -56,4 +56,4 @@ jobs: printf "Deleting '%s' #%d, %'d bytes\n" $name ${ARTCOUNT[$name]} $size ghapi -X DELETE $REPO/actions/artifacts/$id done - done \ No newline at end of file + done diff --git a/.github/workflows/format.yml b/.github/workflows/format.yml index 44f3f90..f5b4276 100644 --- a/.github/workflows/format.yml +++ b/.github/workflows/format.yml @@ -23,4 +23,4 @@ jobs: - name: Check project is formatted uses: jrouly/scalafmt-native-action@v1 with: - version: '3.0.0' + version: '3.1.2' diff --git a/.scalafmt.conf b/.scalafmt.conf index 6a22ccf..e02b957 100644 --- a/.scalafmt.conf +++ b/.scalafmt.conf @@ -1,4 +1,5 @@ -version = 3.0.0 +version = 3.1.2 +runner.dialect = scala212source3 style = defaultWithAlign maxColumn = 120 project.git = true diff --git a/build.sbt b/build.sbt index cb051e7..ef64f7d 100644 --- a/build.sbt +++ b/build.sbt @@ -1,14 +1,16 @@ name := """kanadi""" -val akkaHttpVersion = "10.2.2" -val akkaStreamsJsonVersion = "0.7.0" -val currentScalaVersion = "2.12.11" -val scala213Version = "2.13.4" -val enumeratumCirceVersion = "1.5.23" -val circeVersion = "0.13.0" -val akkaVersion = "2.6.10" -val specs2Version = "4.8.0" -val heikoseebergerAkkaHttpCirceVersion = "1.35.3" +val scala212Version = "2.12.14" +val scala213Version = "2.13.7" +val currentScalaVersion = scala212Version + +val akkaHttpVersion = "10.2.7" +val akkaStreamsJsonVersion = "0.8.0" +val enumeratumCirceVersion = "1.7.0" +val circeVersion = "0.14.1" +val akkaVersion = "2.6.17" +val specs2Version = "4.13.0" +val heikoseebergerAkkaHttpCirceVersion = "1.38.2" ThisBuild / scalaVersion := currentScalaVersion @@ -48,7 +50,7 @@ scalacOptions ++= Seq( "-Xlint:private-shadow", // A private field (or class parameter) shadows a superclass field. "-Xlint:stars-align", // Pattern sequence wildcard must align with sequence component. "-Xlint:type-parameter-shadow", // A local type parameter shadows a type already in scope. - //"-Yno-adapted-args", // Do not adapt an argument list (either by inserting () or creating a tuple) to match the receiver. + // "-Yno-adapted-args", // Do not adapt an argument list (either by inserting () or creating a tuple) to match the receiver. "-Ywarn-dead-code", // Warn when dead code is identified. "-Ywarn-numeric-widen", // Warn when numerics are widened. "-Ywarn-value-discard" // Warn when non-Unit expression results are unused. @@ -86,16 +88,16 @@ libraryDependencies ++= { "com.typesafe.akka" %% "akka-http" % akkaHttpVersion % Provided, "com.typesafe.akka" %% "akka-slf4j" % akkaVersion % Provided, "com.typesafe.akka" %% "akka-stream" % akkaVersion % Provided, - "org.mdedetrich" %% "censored-raw-header" % "0.5.0", - "org.mdedetrich" %% "webmodels" % "0.8.1", + "org.mdedetrich" %% "censored-raw-header" % "0.7.0", + "org.mdedetrich" %% "webmodels" % "0.9.1", "com.beachape" %% "enumeratum-circe" % enumeratumCirceVersion, "io.circe" %% "circe-parser" % circeVersion, "org.mdedetrich" %% "akka-stream-circe" % akkaStreamsJsonVersion, "org.mdedetrich" %% "akka-http-circe" % akkaStreamsJsonVersion, "de.heikoseeberger" %% "akka-http-circe" % heikoseebergerAkkaHttpCirceVersion, - "com.iheart" %% "ficus" % "1.4.7", - "com.typesafe.scala-logging" %% "scala-logging" % "3.9.2", - "ch.qos.logback" % "logback-classic" % "1.1.7", + "com.iheart" %% "ficus" % "1.5.1", + "com.typesafe.scala-logging" %% "scala-logging" % "3.9.4", + "ch.qos.logback" % "logback-classic" % "1.2.7", "org.specs2" %% "specs2-core" % specs2Version % Test ) ++ (CrossVersion.partialVersion(scalaVersion.value) match { case Some((2, n)) if n == 13 => diff --git a/project/plugins.sbt b/project/plugins.sbt index 5fcb530..32b0f22 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1,15 +1,8 @@ -addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.4.3") - -addSbtPlugin("com.github.sbt" % "sbt-pgp" % "2.1.2") - -addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "3.9.7") - -addSbtPlugin("com.thoughtworks.sbt-api-mappings" % "sbt-api-mappings" % "3.0.0") - -addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.8.2") - -addSbtPlugin("org.scoverage" % "sbt-coveralls" % "1.3.1") - -addSbtPlugin("com.codecommit" % "sbt-github-actions" % "0.12.0") - -addSbtPlugin("com.github.sbt" % "sbt-release" % "1.1.0") +addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.4.4") +addSbtPlugin("com.github.sbt" % "sbt-pgp" % "2.1.2") +addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "3.9.10") +addSbtPlugin("com.thoughtworks.sbt-api-mappings" % "sbt-api-mappings" % "3.0.0") +addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.9.2") +addSbtPlugin("org.scoverage" % "sbt-coveralls" % "1.3.1") +addSbtPlugin("com.codecommit" % "sbt-github-actions" % "0.13.0") +addSbtPlugin("com.github.sbt" % "sbt-release" % "1.1.0") diff --git a/src/main/scala/org/zalando/kanadi/api/Events.scala b/src/main/scala/org/zalando/kanadi/api/Events.scala index 9cbaa48..b0444d4 100644 --- a/src/main/scala/org/zalando/kanadi/api/Events.scala +++ b/src/main/scala/org/zalando/kanadi/api/Events.scala @@ -10,7 +10,6 @@ import akka.http.scaladsl.model._ import akka.http.scaladsl.model.headers.RawHeader import akka.http.scaladsl.unmarshalling.Unmarshal import akka.stream.Materializer -import cats.syntax.either._ import com.typesafe.scalalogging.{Logger, LoggerTakingImplicit} import de.heikoseeberger.akkahttpcirce.ErrorAccumulatingCirceSupport._ import enumeratum._ @@ -24,7 +23,6 @@ import org.zalando.kanadi.models._ import scala.concurrent.{ExecutionContext, Future} import scala.concurrent.duration._ -import scala.language.postfixOps sealed abstract class Event[T](val data: T) { def getMetadata: Option[Metadata] = this match { diff --git a/src/main/scala/org/zalando/kanadi/api/Registry.scala b/src/main/scala/org/zalando/kanadi/api/Registry.scala index 6cbb4f9..1041365 100644 --- a/src/main/scala/org/zalando/kanadi/api/Registry.scala +++ b/src/main/scala/org/zalando/kanadi/api/Registry.scala @@ -2,7 +2,6 @@ package org.zalando.kanadi.api import java.net.URI -import defaults._ import akka.http.scaladsl.HttpExt import akka.http.scaladsl.model.headers.RawHeader import akka.http.scaladsl.model.{ContentTypes, HttpMethods, HttpRequest, Uri} diff --git a/src/main/scala/org/zalando/kanadi/api/Subscriptions.scala b/src/main/scala/org/zalando/kanadi/api/Subscriptions.scala index 0af4118..6a4cdde 100644 --- a/src/main/scala/org/zalando/kanadi/api/Subscriptions.scala +++ b/src/main/scala/org/zalando/kanadi/api/Subscriptions.scala @@ -14,7 +14,6 @@ import akka.http.scaladsl.unmarshalling.Unmarshal import akka.stream._ import akka.stream.scaladsl._ import akka.util.ByteString -import cats.syntax.either._ import com.typesafe.scalalogging.{Logger, LoggerTakingImplicit} import de.heikoseeberger.akkahttpcirce.ErrorAccumulatingCirceSupport._ import enumeratum._ diff --git a/src/main/scala/org/zalando/kanadi/api/package.scala b/src/main/scala/org/zalando/kanadi/api/package.scala index 525a6e1..7ff74f5 100644 --- a/src/main/scala/org/zalando/kanadi/api/package.scala +++ b/src/main/scala/org/zalando/kanadi/api/package.scala @@ -5,7 +5,6 @@ import akka.http.scaladsl.model.headers._ import akka.http.scaladsl.model.{HttpEntity, HttpHeader, HttpRequest, HttpResponse} import akka.http.scaladsl.unmarshalling.{Unmarshal, Unmarshaller} import akka.stream.Materializer -import cats.syntax.either._ import com.typesafe.scalalogging.CanLog import io.circe._ import org.mdedetrich.webmodels.RequestHeaders.`X-Flow-ID` diff --git a/src/main/scala/org/zalando/kanadi/package.scala b/src/main/scala/org/zalando/kanadi/package.scala index 3787f7c..94808e0 100644 --- a/src/main/scala/org/zalando/kanadi/package.scala +++ b/src/main/scala/org/zalando/kanadi/package.scala @@ -1,7 +1,6 @@ package org.zalando import java.net.URI -import cats.syntax.either._ import io.circe.Decoder.Result import io.circe.syntax._ import io.circe.{Decoder, DecodingFailure, Encoder, HCursor}