-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
36 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
...io/quarkus/devtools/project/update/rewrite/operations/DropDependencyVersionOperation.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
package io.quarkus.devtools.project.update.rewrite.operations; | ||
|
||
import java.util.Map; | ||
|
||
import io.quarkus.devtools.project.BuildTool; | ||
import io.quarkus.devtools.project.update.rewrite.RewriteOperation; | ||
|
||
public class DropDependencyVersionOperation implements RewriteOperation { | ||
|
||
private final String groupId; | ||
private final String artifactId; | ||
|
||
public DropDependencyVersionOperation(String groupId, String artifactId) { | ||
this.groupId = groupId; | ||
this.artifactId = artifactId; | ||
} | ||
|
||
@Override | ||
public Map<String, Object> single(BuildTool buildTool) { | ||
switch (buildTool) { | ||
// Gradle is not yet implemented: https://github.com/openrewrite/rewrite/issues/3546 | ||
case MAVEN: | ||
return Map.of("org.openrewrite.maven.RemoveRedundantDependencyVersions", | ||
Map.of( | ||
"groupId", groupId, | ||
"artifactId", artifactId)); | ||
default: | ||
return Map.of(); | ||
} | ||
} | ||
|
||
} |