-
Notifications
You must be signed in to change notification settings - Fork 317
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
Adding gradle wrapper through distribution is now possible #4491
Open
Jenson3210
wants to merge
8
commits into
openrewrite:main
Choose a base branch
from
Jenson3210:issue_4490
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
5d71d80
Fixes #4490
0d63ee8
Added checksum for custom distributionUri
2c54ba8
Fixed test
4a1ccd1
Removed leftover investigation disabled annotations
d94dc0c
Review comments + added scenario's in testcase of migration/addition/…
f76a5cb
fix test, again...
7403e54
Apply formatter and collapse imports
timtebeek eba054e
Slight polish
timtebeek File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this section is necessary as the wrapperUri would already be what's used in the
GradleWrapper
object from thegetGradleWrapper()
invocation.On the same version part of the equation do we want to be changing the distribution URL without a version change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's not necessarily true i think.
Imagine calling the updatewrapper("8.2", null...) with a custom url already present in the properties file. Getwrapper would return the gradle services hosted wrapper (as no custom url is given) with sha and jarsha. We want to early on replace that with the custom distribution url wrapper without shas so that later replacement could be removed in the properties entry visitor (as that was where the patch of url happened before) + would add a sha in the properties visitor (previous bug I discovered during adding tests)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, I see. The previous case is we weren't able to resolve while this case is we were.
Any reason not to just merge these two of blocks together then? So that if the distribution host is null or doesn't match?
There's an additional edge case of going from internal to external hosting that could be another possibility.