spring-projects / spring-rewrite-commons

Apache License 2.0
9 stars 11 forks source link

Rewrite Plugin Invoker for Maven, Gradle, and Polyglot #72

Closed fabapp2 closed 7 months ago

fabapp2 commented 8 months ago

Add plugin-invoker-* for Maven, Gradle, and Polyglot projects. RewritePlugin, RewriteGradlePlugin, and RewriteMavenPlugin provide a fluent API to execute OpenRewrite recipes from Java applications using Maven or Gradle.

        Pat baseDir = ...

    PluginInvocationResult result = RewritePlugin.run()
        .gradlePluginVersion("6.10.0")
        .recipes("recipe-1", "recipe-2")
        .dependencies("groupId:artifactId:version")
        .withMemory("18M", "280M")
        .withDebug()
        .withDebugging(5007, false)
        .onDir(baseDir);