Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,20 @@ 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
name: Publish Artifacts
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:
Expand All @@ -51,4 +50,4 @@ jobs:
env:
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
run: sbt '+publishSigned; sonatypeCentralRelease'
run: sbt '+publishSigned; sonaRelease'
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ src_managed/
project/boot/
project/plugins/project/
project/local-plugins.sbt
project/project/
.history
.ensime
.ensime_cache/
Expand All @@ -24,7 +25,7 @@ local.sbt
# Metals
.bloop/
.metals/
metals.sbt
project/metals.sbt

# IDEA
.idea
Expand Down
2 changes: 1 addition & 1 deletion .scalafmt.conf
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
version = "3.8.3"
version = "3.10.4"
runner.dialect = scala3
maxColumn = 120
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -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

Expand All @@ -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)

Expand Down
13 changes: 8 additions & 5 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -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
)

Expand Down Expand Up @@ -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"
)
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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"""| <versioning>
| <latest>${latestV}</latest>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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."
Expand Down
2 changes: 1 addition & 1 deletion project/build.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
sbt.version=1.10.11
sbt.version=1.12.0
5 changes: 2 additions & 3 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -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")