From 0844fc154a28e2950567fe1b4a0128dc8adb7749 Mon Sep 17 00:00:00 2001 From: Roman Langolf Date: Sat, 17 Jan 2026 12:34:09 +0700 Subject: [PATCH 1/2] update dependencies, reformat --- .github/workflows/ci.yml | 7 +++---- .gitignore | 3 ++- .scalafmt.conf | 2 +- build.sbt | 13 ++++++++----- .../dev/rolang/gar/ArtifactregistryHandler.scala | 4 ++-- .../main/scala/dev/rolang/sbt/gar/GarPlugin.scala | 2 +- project/build.properties | 2 +- project/plugins.sbt | 5 ++--- 8 files changed, 20 insertions(+), 18 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f888193..56a10f3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,13 +11,12 @@ jobs: test: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v5 - uses: coursier/cache-action@v6 - uses: VirtusLab/scala-cli-setup@main with: jvm: temurin:21 apps: sbt - power: true - run: sbt +Test/compile publish: runs-on: ubuntu-latest @@ -25,7 +24,7 @@ jobs: needs: [test] if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/master') steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v5 - uses: coursier/cache-action@v6 - uses: VirtusLab/scala-cli-setup@main with: @@ -51,4 +50,4 @@ jobs: env: SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }} SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }} - run: sbt '+publishSigned; sonatypeCentralRelease' \ No newline at end of file + run: sbt '+publishSigned; sonaRelease' \ No newline at end of file diff --git a/.gitignore b/.gitignore index 71d62ab..d326033 100644 --- a/.gitignore +++ b/.gitignore @@ -9,6 +9,7 @@ src_managed/ project/boot/ project/plugins/project/ project/local-plugins.sbt +project/project/ .history .ensime .ensime_cache/ @@ -24,7 +25,7 @@ local.sbt # Metals .bloop/ .metals/ -metals.sbt +project/metals.sbt # IDEA .idea diff --git a/.scalafmt.conf b/.scalafmt.conf index 9bd3a4a..37a9e22 100644 --- a/.scalafmt.conf +++ b/.scalafmt.conf @@ -1,3 +1,3 @@ -version = "3.8.3" +version = "3.10.4" runner.dialect = scala3 maxColumn = 120 \ No newline at end of file diff --git a/build.sbt b/build.sbt index f12c090..f664e53 100644 --- a/build.sbt +++ b/build.sbt @@ -18,15 +18,18 @@ ThisBuild / licenses := Seq(License.Apache2) ThisBuild / homepage := Some(url("https://github.com/rolang/gar-handler")) ThisBuild / version ~= { v => if (v.contains('+')) s"${v.replace('+', '-')}-SNAPSHOT" else v } ThisBuild / versionScheme := Some("early-semver") -ThisBuild / sonatypeCredentialHost := xerial.sbt.Sonatype.sonatypeCentralHost -lazy val scala213 = "2.13.16" -lazy val scala212 = "2.12.20" +lazy val scala213 = "2.13.18" +lazy val scala212 = "2.12.21" ThisBuild / scalaVersion := scala213 lazy val commonSettings = List( - publishTo := sonatypePublishToBundle.value, + publishTo := { + val centralSnapshots = "https://central.sonatype.com/repository/maven-snapshots/" + if (isSnapshot.value) Some("central-snapshots" at centralSnapshots) + else localStaging.value + }, publishMavenStyle := true ) @@ -64,7 +67,7 @@ lazy val core = project Seq(file) }.taskValue, libraryDependencies ++= Seq( - "com.google.cloud" % "google-cloud-storage" % "2.34.0" + "com.google.cloud" % "google-cloud-storage" % "2.62.0" ) ) diff --git a/modules/core/src/main/scala/dev/rolang/gar/ArtifactregistryHandler.scala b/modules/core/src/main/scala/dev/rolang/gar/ArtifactregistryHandler.scala index 5c129b6..d21cd64 100644 --- a/modules/core/src/main/scala/dev/rolang/gar/ArtifactregistryHandler.scala +++ b/modules/core/src/main/scala/dev/rolang/gar/ArtifactregistryHandler.scala @@ -47,7 +47,7 @@ object ArtifactRegistryUrlHandlerFactory { } def createURLStreamHandler(logger: Logger): ArtifactRegistryUrlHandler = { - val httpTransport = httpTransportFactory.create() + val httpTransport = httpTransportFactory.create() val googleHttpRequestFactory = googleCredentials(logger) match { case Some(credentials) => val requestInitializer = new HttpCredentialsAdapter(credentials) @@ -179,7 +179,7 @@ class ArtifactRegistryUrlConnection( .toList val versioningXml = versions.headOption.map(_ => versions.maxBy(_._2)) match { - case None => "" + case None => "" case Some((latestV, latestDt)) => s"""| | ${latestV} diff --git a/modules/sbt/src/main/scala/dev/rolang/sbt/gar/GarPlugin.scala b/modules/sbt/src/main/scala/dev/rolang/sbt/gar/GarPlugin.scala index 5905751..52dd1b3 100644 --- a/modules/sbt/src/main/scala/dev/rolang/sbt/gar/GarPlugin.scala +++ b/modules/sbt/src/main/scala/dev/rolang/sbt/gar/GarPlugin.scala @@ -26,7 +26,7 @@ object GarPlugin extends AutoPlugin { Try { dev.rolang.gar.ArtifactRegistryUrlHandlerFactory.install(logger) } match { - case Success(_) => state + case Success(_) => state case Failure(err) => { sbtLogger.err( s"Failed to install artigactregistry handler: ${err}. Publishing/resolving artifacts from Google Artifact Registry is disabled." diff --git a/project/build.properties b/project/build.properties index cc68b53..30b7fd9 100644 --- a/project/build.properties +++ b/project/build.properties @@ -1 +1 @@ -sbt.version=1.10.11 +sbt.version=1.12.0 diff --git a/project/plugins.sbt b/project/plugins.sbt index 6078ace..48dc16b 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1,4 +1,3 @@ addSbtPlugin("com.github.sbt" % "sbt-pgp" % "2.3.1") -addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "3.12.2") -addSbtPlugin("com.github.sbt" % "sbt-dynver" % "5.1.0") -addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.5.4") +addSbtPlugin("com.github.sbt" % "sbt-dynver" % "5.1.1") +addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.5.6") From 763ce57c7ade1852d3ac3f087236bb6add78a2b8 Mon Sep 17 00:00:00 2001 From: Roman Langolf Date: Sat, 17 Jan 2026 12:39:06 +0700 Subject: [PATCH 2/2] update badge --- README.md | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 560c237..e55aa7c 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,5 @@ -[![Maven Central](https://maven-badges.herokuapp.com/maven-central/dev.rolang/gar-coursier_2.13/badge.svg)](https://maven-badges.herokuapp.com/maven-central/dev.rolang/gar-coursier_2.13/) + +![Maven Central Version](https://img.shields.io/maven-central/v/dev.rolang/gar-coursier_2.13) # Google Artifact Registry support for sbt and/or coursier @@ -14,7 +15,7 @@ Adds support for missing `maven-metadata.xml`. To use the sbt plugin add to `project/plugins.sbt`: ```scala -lazy val garHandlerVersion = "0.1.3" +lazy val garHandlerVersion = "0.1.4" addSbtPlugin("dev.rolang" % "sbt-gar-handler" % garHandlerVersion)