From e3c1b3f2d61bcbc48a716dad05b3d0b9ea670f99 Mon Sep 17 00:00:00 2001 From: Kacper Korban Date: Wed, 7 Aug 2024 11:39:34 +0200 Subject: [PATCH 1/2] Change .gitignore to facilitate vscode and metals usage --- .gitignore | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.gitignore b/.gitignore index 90f70a56..47159313 100644 --- a/.gitignore +++ b/.gitignore @@ -16,6 +16,10 @@ project/plugins/project/ .scala_dependencies .idea* .bsp +.vscode/ +.bloop/ +.metals/ +metals.sbt src/sbt-test/*/*/bin/.lib From c28ae87a5c1052cabed844d7001f3ab1d94f16a2 Mon Sep 17 00:00:00 2001 From: Kacper Korban Date: Wed, 7 Aug 2024 11:42:31 +0200 Subject: [PATCH 2/2] Change sonatype central client dependency to remove zio-json dependency Changes zio-json dependency to upickle --- build.sbt | 9 ++++----- .../xerial/sbt/sonatype/SonatypeCentralClient.scala | 4 ++-- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/build.sbt b/build.sbt index 54eb31ea..a8708fc9 100755 --- a/build.sbt +++ b/build.sbt @@ -22,9 +22,8 @@ val versions = new { val scala = "2.12.19" // Must use Scala 2.12.x for sbt plugins val airframe = "24.7.0" val sonatypeZapperClient = "1.3" - val sttp = "4.0.0-M10" - val zioJson = "0.6.2" - val sonatypeClient = "0.1.0" + val sttp = "4.0.0-M16" + val sonatypeClient = "0.3.0" } ThisBuild / dynverSeparator := "-" @@ -70,8 +69,8 @@ lazy val sbtSonatype = excludeAll (ExclusionRule("org.scala-lang.modules", "scala-parser-combinators_2.12")), "org.wvlet.airframe" %% "airspec" % versions.airframe % Test, "com.lumidion" %% "sonatype-central-client-sttp-core" % versions.sonatypeClient, - "com.lumidion" %% "sonatype-central-client-zio-json" % versions.sonatypeClient, + "com.lumidion" %% "sonatype-central-client-upickle" % versions.sonatypeClient, "com.softwaremill.sttp.client4" %% "slf4j-backend" % versions.sttp, - "com.softwaremill.sttp.client4" %% "zio-json" % versions.sttp + "com.softwaremill.sttp.client4" %% "upickle" % versions.sttp ) ) diff --git a/src/main/scala/xerial/sbt/sonatype/SonatypeCentralClient.scala b/src/main/scala/xerial/sbt/sonatype/SonatypeCentralClient.scala index 774db235..c7664b63 100644 --- a/src/main/scala/xerial/sbt/sonatype/SonatypeCentralClient.scala +++ b/src/main/scala/xerial/sbt/sonatype/SonatypeCentralClient.scala @@ -9,7 +9,7 @@ import com.lumidion.sonatype.central.client.core.{ } import com.lumidion.sonatype.central.client.core.DeploymentState.PUBLISHED import com.lumidion.sonatype.central.client.sttp.core.SyncSonatypeClient -import com.lumidion.sonatype.central.client.zio.json.decoders.* +import com.lumidion.sonatype.central.client.upickle.decoders.* import java.io.File import sbt.librarymanagement.ivy.Credentials import scala.math.pow @@ -18,7 +18,7 @@ import sttp.client4.{HttpError, ResponseException} import sttp.client4.httpurlconnection.HttpURLConnectionBackend import sttp.client4.logging.slf4j.Slf4jLoggingBackend import sttp.client4.logging.LoggingOptions -import sttp.client4.ziojson.asJson +import sttp.client4.upicklejson.default.* import sttp.model.StatusCode import wvlet.log.LogSupport import xerial.sbt.sonatype.utils.Extensions.*