8000 Add support for custom protocol with coursier by MasseGuillaume · Pull Request #6375 · sbt/sbt · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Add support for custom protocol with coursier #6375

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

8000
Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

MasseGuillaume
Copy link
Member
@MasseGuillaume MasseGuillaume commented Mar 9, 2021

In coursier, you can handle custom protocols by defining a protocol handler:
https://get-coursier.io/docs/2.0.10/extra.html#extra-protocols
https://github.com/coursier/coursier/blob/ce251d0288bf029e4eeb8700e8990178559a005d/modules/tests/jvm/src/test/scala/coursier/cache/protocol/TestprotocolHandler.scala

I'm currently implementing support for Google Artifact Resitory:
coursier/coursier#1987 (comment)

When dealing with artifact with protocol artifactregistry I need to have a plugin available in the classpath. Since lmcoursier is in the sbt launcher classpath, it's not available by adding libraryDependencies += ... in project/plugins.sbt like you would do for an sbt plugin. Therefore, I propose a way to explicitly declare the artifacts you need to handle the protocol handling.

Users of custom protocol can now specify dependencies to their handler via this sbt setting:

csrProtocolHandlerDependencies += "org.example" % "google-artifact-repository-coursier" % "0.1.0"

Depends on coursier/sbt-coursier#327

@MasseGuillaume MasseGuillaume force-pushed the coursier-custom-protocol branch from 2f855d2 to 5ffc6bc Compare May 16, 2022 21:39
@987Nabil
Copy link
Contributor

Is there anything that speaks against this? I'd really like to have this 🙂

@sideeffffect
Copy link
Contributor

What is blocking this? It would be of great help for us.

@laughedelic
Copy link
Member

⬆️ 🙏

@eed3si9n
Copy link
Member

I think this PR should be on top of 1.9.x branch, since develop branch is for sbt 2.x.

@rolang
Copy link
rolang commented Feb 24, 2024

It seems to be possible to set it via csrConfiguration as well? Adding it like that worked for us:

csrConfiguration := csrConfiguration.value.withProtocolHandlerDependencies(
  Seq("org.example" % "google-artifact-repository-coursier" % "0.1.0")
)

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.

6 participants
0