openrewrite / rewrite-gradle-plugin

OpenRewrite's Gradle plugin.
Apache License 2.0
60 stars 37 forks source link

Parse Gradle wrapper files separately #248

Closed timtebeek closed 9 months ago

timtebeek commented 9 months ago

What's changed?

Parse gradle wrapper files separately from other resource files, such that they get the markers expected in UpdateGradleWrapper.

What's your motivation?

Fixes moderneinc/moderne-gradle-plugin#142

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

Didn't see a good option to test that the files are indeed parsed as non-resource files, other than using breakpoints in the debugger. It works, but it can be broken. Any suggestions for a better test assertion?

Also figured we'd only pick up Gradle wrapper files from the root project; would you agree there?

Have you considered any alternatives or workarounds?

As discussed on the issue linked above