rewrite icon indicating copy to clipboard operation
rewrite copied to clipboard

Custom `distributionUrl` in gradle properties should be upgraded in place

Open Laurens-W opened this issue 1 year ago • 2 comments

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

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

Laurens-W avatar Aug 26 '24 07:08 Laurens-W

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.

shanman190 avatar Aug 27 '24 03:08 shanman190

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.

Laurens-W avatar Aug 27 '24 08:08 Laurens-W