Skip to content

Port ArtifactRegistryIvyResolver to Scala 3 / sbt 2#8

Merged
rolang merged 2 commits into
masterfrom
missing-sbt-ArtifactRegistryIvyResolver-port
Jul 13, 2026
Merged

Port ArtifactRegistryIvyResolver to Scala 3 / sbt 2#8
rolang merged 2 commits into
masterfrom
missing-sbt-ArtifactRegistryIvyResolver-port

Conversation

@rolang

@rolang rolang commented Jul 13, 2026

Copy link
Copy Markdown
Owner

Summary

  • The scala-2.12 (sbt 1.x) source set has ArtifactRegistryIvyRepository/ArtifactRegistryIvyResolver, a custom Ivy AbstractRepository that PUTs artifacts via the Google HTTP client directly. This was never ported to the scala-3 (sbt 2.x) source set.
  • Without it, a plain artifactregistry:// publishTo on sbt 2 falls through to Ivy's stock URLRepository, which hardcodes protocol == "http" for PUT and throws UnsupportedOperationException: URL repository only support HTTP PUT at the moment for any other scheme — even though the JVM-wide URL handler is installed correctly.
  • Adds modules/sbt/src/main/scala-3/dev/rolang/sbt/gar/ArtifactRegistryIvyRepository.scala, a straight port (only an unused java.net.URL import dropped).
  • Wires it into GarCompat's scala-3 publishTo mapping, restoring parity with the scala-2.12 version: a plain artifactregistry:// publishTo is now automatically wrapped with ArtifactRegistryIvyResolver on sbt 2 as well.

Test plan

  • sbt ++3.8.4 plugin/compile — compiles cleanly
  • sbt ++2.12.21 plugin/compile — sbt 1.x cross-build still compiles, unaffected
  • sbt scalafmtCheckAll — clean

🤖 Generated with Claude Code

rolang added 2 commits July 13, 2026 07:10
…la 3 / sbt 2

The scala-2.12 (sbt 1.x) source set had ArtifactRegistryIvyRepository/
ArtifactRegistryIvyResolver, using a custom Ivy repository that PUTs
via the Google HTTP client directly. This was never ported to the
scala-3 (sbt 2.x) source set, so publishTo on sbt 2 falls back to
Ivy's stock URLRepository, which only supports the http protocol for
PUT and throws UnsupportedOperationException for artifactregistry://.
…ping

Restores parity with the scala-2.12 (sbt 1.x) source set: a plain
artifactregistry:// publishTo is now automatically wrapped with
ArtifactRegistryIvyResolver, so it goes through the Google HTTP client
PUT instead of Ivy's stock URLRepository, which only supports http.
@rolang
rolang merged commit 832a870 into master Jul 13, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant