Gradle - Add tests for update in dependencyManagement
What's changed?
- Introduced tests for demonstrating the issue.
What's your motivation?
- https://github.com/openrewrite/rewrite/issues/5300
Anything in particular you'd like reviewers to focus on?
- How to implement the new use case?
Anyone you would like to review specifically?
@timtebeek
Have you considered any alternatives or workarounds?
Yes, workaround considered and explained in https://github.com/openrewrite/rewrite/issues/5300, but not feasible in certain scenarios.
Checklist
- [X] I've added unit tests to cover both positive and negative cases
- [ ] I've read and applied the recipe conventions and best practices
- [X] I've used the IntelliJ IDEA auto-formatter on affected files
Thanks for the start here @ThomasVitale ! I'm going to ask if @shanman190 has some guiding hints here for whether we want to make these changes as part of this recipe, and if that should be in a separate visitor perhaps. He's our friendly community authority on all things Gradle. 🧙🏻♂️
Perfect, thank you so much!
@shanman190 thanks so much for the inputs. I'll look a bit deeper into the JavaIsoVisitor and consider support for both the Groovy DSL and Kotlin DSL. I hope I'll get a draft PR ready soon.
I have pushed a draft PR that addresses this one. The implementation is still quite dirty, but I feel this Trait could easily be added to other recipes like UpgradeDependencyVersion etc to make them also bump the depdencyManagement section.