Open sridamul opened 5 days ago
What about packaging our own rewrite.yml on META-INF/rewrite/*.yml recipes
?
And perhaps we should only use OpenRewrite YAML format for declarative recipe and not use our own recipe_data.yaml ?
https://docs.openrewrite.org/reference/yaml-format-reference
This contains also description we can use for the "--list-recipes"
What feature do you want to see added?
Some recipes like Replacelibrarieswithapiplugin, UpgradeJavaVersion etc. requires configuration parameters to execute the recipe.
Idea: We can parse the rewrite.yml file (path can be passed as argument, a new option required) to extract the
name
(added to activeRecipes) andrecipeList
(to add the respective recipeArtifactCoordinates)For Eg: In below rewrite.xml, we can obtain
com.yourorg.IsJenkinsPluginExample
to activeRecipes andio.jenkins.plugin-modernizer:plugin-modernizer-core:${project.version}
as an artifact coordinate fororg.openrewrite.jenkins.IsJenkinsPlugin
recipeTesting: I created a rewrite.yml file inside plugin dir and added the name to activeRecipes. This works fine and the recipe is applied to the plugin successfully.
Need to improvise the idea and also open to any other approaches or suggestions.
Upstream changes
No response
Are you interested in contributing this feature?
No response