Activate Style in Gradle Project
Sets the specified style as active. Once the style has been set, future recipes will use the specified style for any changes they make. This recipe does not reformat anything on its own. Prefers to set the
activeStyle()method in the
rewriteDSL in a build.gradle.If no
rewriteDSL can be found to update, will instead place a "systemProp.rewrite.activeStyles" entry within the project's gradle.properties. Styles can be provided by rewrite itself, defined in a rewrite.yml, or provided by recipe modules.
- groupId: org.openrewrite
- artifactId: rewrite-gradle
- version: 7.40.6
The name of the style to activate.
Optional. When set to
This recipe has required configuration parameters. Recipes with required configuration parameters cannot be activated directly. To activate this recipe you must create a new recipe which fills in the required parameters. In your
rewrite.ymlcreate a new recipe with a unique name. For example:
com.yourorg.ActivateStyleExample. Here's how you can define and customize such a recipe within your rewrite.yml:
displayName: Activate Style in Gradle Project example
com.yourorg.ActivateStyleExamplehas been defined activate it in your build file:
The community edition of the Moderne platform enables you to easily run recipes across thousands of open-source repositories.
Please contact Moderne for more information about safely running the recipes on your own codebase in a private SaaS.