-
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.
Fixes #32768
- Loading branch information
Showing
6 changed files
with
67 additions
and
11 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
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
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
29 changes: 29 additions & 0 deletions
29
...main/java/io/quarkus/devtools/project/update/operations/UpgradeGradlePluginOperation.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,29 @@ | ||
package io.quarkus.devtools.project.update.operations; | ||
|
||
import java.util.Map; | ||
|
||
import io.quarkus.devtools.project.BuildTool; | ||
import io.quarkus.devtools.project.update.RewriteOperation; | ||
|
||
public class UpgradeGradlePluginOperation implements RewriteOperation { | ||
|
||
public String pluginIdPattern; | ||
public String newVersion; | ||
|
||
public UpgradeGradlePluginOperation(String pluginIdPattern, String newVersion) { | ||
this.pluginIdPattern = pluginIdPattern; | ||
this.newVersion = newVersion; | ||
} | ||
|
||
@Override | ||
public Map<String, Object> toMap(BuildTool buildTool) { | ||
switch (buildTool) { | ||
case GRADLE: | ||
return Map.of( | ||
"org.openrewrite.gradle.plugins.UpgradePluginVersion", | ||
Map.of("pluginIdPattern", pluginIdPattern, "newVersion", newVersion)); | ||
default: | ||
throw new UnsupportedOperationException("This operation is only supported for Gradle projects"); | ||
} | ||
} | ||
} |