-
Notifications
You must be signed in to change notification settings - Fork 368
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
Remove redundant versions for Gradle #4492
Conversation
rewrite-gradle/src/main/java/org/openrewrite/gradle/RemoveRedundantDependencyVersions.java
Show resolved
Hide resolved
rewrite-gradle/src/test/java/org/openrewrite/gradle/RemoveRedundantDependencyVersionsTest.java
Show resolved
Hide resolved
rewrite-gradle/src/test/java/org/openrewrite/gradle/RemoveRedundantDependencyVersionsTest.java
Outdated
Show resolved
Hide resolved
9381432
to
a70e429
Compare
The implementation here is now handling everything except for freestanding scripts which like the other recipes is also spotty for support anyway. |
The one failing test as described earlier.
|
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
…pe to the current buildscript only
…onfigurations. Include fix for ChangeDependencyClassifier for G.MapLiteral types
2abf042
to
630cf5f
Compare
public J.MethodInvocation visitMethodInvocation(J.MethodInvocation method, ExecutionContext p) { | ||
J.MethodInvocation m = super.visitMethodInvocation(method, p); |
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.
public J.MethodInvocation visitMethodInvocation(J.MethodInvocation method, ExecutionContext p) { | |
J.MethodInvocation m = super.visitMethodInvocation(method, p); | |
public J.MethodInvocation visitMethodInvocation(J.MethodInvocation method, ExecutionContext ctx) { | |
J.MethodInvocation m = super.visitMethodInvocation(method, ctx); |
MavenPomDownloader mpd = new MavenPomDownloader(p); | ||
try { |
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.
MavenPomDownloader mpd = new MavenPomDownloader(p); | |
try { | |
MavenPomDownloader mpd = new MavenPomDownloader(ctx); | |
.resolve(Collections.emptyList(), mpd, ctx); |
MavenPomDownloader mpd = new MavenPomDownloader(p); | ||
try { |
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.
MavenPomDownloader mpd = new MavenPomDownloader(p); | |
try { | |
MavenPomDownloader mpd = new MavenPomDownloader(ctx); | |
.resolve(Collections.emptyList(), mpd, ctx); |
What's changed?
Add recipe to remove redundant versions.
What's your motivation?
A similar feature is available in Maven.
Anything in particular you'd like reviewers to focus on?
Nothing in particular
Anyone you would like to review specifically?
Anybody
Have you considered any alternatives or workarounds?
Forcibly removing versions would result in broken builds.
Any additional context
Checklist