Skip to content
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

Custom distributionUrl in gradle properties should be upgraded in place #4445

Merged
merged 19 commits into from
Aug 29, 2024

Conversation

Laurens-W
Copy link
Contributor

What's changed?

Add testcase that validates a custom distributionUrl for the gradle wrapper can be updated in place

What's your motivation?

Anything in particular you'd like reviewers to focus on?

Anyone you would like to review specifically?

@timtebeek

Have you considered any alternatives or workarounds?

Any additional context

Checklist

  • I've added unit tests to cover both positive and negative cases
  • I've read and applied the recipe conventions and best practices
  • I've used the IntelliJ IDEA auto-formatter on affected files

@Laurens-W Laurens-W added the enhancement New feature or request label Aug 26, 2024
@Laurens-W Laurens-W self-assigned this Aug 26, 2024
@Laurens-W Laurens-W changed the title Custom distributionUrl should be upgraded in place Custom distributionUrl in gradle properties should be upgraded in place Aug 26, 2024
…sting distribution url and update the version assuming the user provided a version they know exists.
@shanman190
Copy link
Contributor

Hi @Laurens-W!

If I'm not mistaken I think this is only ever a possible state to reach if you're using the UpdateGradleWrapper recipe directly. At that point, is there any reason to not just configure the wrapperUri parameter? Doing so would achieve the same goal, while being more explicit.

github-actions[bot]

This comment was marked as outdated.

@Laurens-W
Copy link
Contributor Author

Hi @Laurens-W!

If I'm not mistaken I think this is only ever a possible state to reach if you're using the UpdateGradleWrapper recipe directly. At that point, is there any reason to not just configure the wrapperUri parameter? Doing so would achieve the same goal, while being more explicit.

Hey!
That's a valid question. This addition is more so aimed towards users who might not know services.gradle.org is not available to them. They'd simply set a version number or pattern, of which the latter still results in an exception, and expect the recipe to update what they previously used in place.
It's more so about covering flows that do not currently work than it is about necessarily wanting users to use the recipe this way.

github-actions[bot]

This comment was marked as outdated.

@Laurens-W Laurens-W force-pushed the gradle-use-existing-distribution-url branch from f04b2a4 to 624883f Compare August 27, 2024 13:21
github-actions[bot]

This comment was marked as outdated.

@Laurens-W Laurens-W marked this pull request as ready for review August 28, 2024 08:55
…leWrapper.java

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
github-actions[bot]

This comment was marked as outdated.

@timtebeek timtebeek merged commit b64e1ed into main Aug 29, 2024
2 checks passed
@timtebeek timtebeek deleted the gradle-use-existing-distribution-url branch August 29, 2024 09:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

4 participants