-
Notifications
You must be signed in to change notification settings - Fork 20
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
Removes reliance on Okhttp3 for sbt 1.7+ support #31
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
… to inject headers into the download, upload, and geturl requests for sbt 1.7.1 support. Commented out code that relied okhttp3
…redentials when the host matches
fyi @gilandose this should fix #30. A merge/publish would be greatly appreciated. |
@gilandose bump |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The plugin originally relied on the
RequestInterceptor
capabilities that were part of theOKHttp3
client backed exposed viasbt.CustomHttp
. Additionally it also relied on theGigaHorseURLHandler
to leverage theOkHttp3
client. Unfortunately all of this was removed as part of the SBT 1.7.0 release (see pr: sbt/librarymanagement#399).The
OkHttp3
client backed was swapped out for the theApache HTTP HttpAsyncClient
. But as far as i can tell it does not have the sameRequestInterceptor
capabilities. additionally with the removal of theGigaHorseUrlHandler
There isnt any way (from what I could tell) that actually leveraged or used the Apache gigahorse client.So to get this to work with
sbt 1.7.0
I extended theBasicURLHandler
that the SBT plugin is using as the default UrlHandler and added logic to add the gitlab credential headers to thegetUrlInfo
,download
, andupload
requests when the host name matches provided (or default) gitlab hostname.From my limited testing capabilities I was able to both publish to and pull from our private self hosted gitlab repo on sbt 1.7 using the plugin without having to make any changes to my sbt files.
Additionally I pulled in the change from issue #25 / pr #27 since there have been a few issues with people naming their resolver
gitlab-maven
and the publishResolver overwrites it