Class RewriteSettingsPlugin

java.lang.Object
org.openrewrite.gradle.RewriteSettingsPlugin
All Implemented Interfaces:
org.gradle.api.Plugin<org.gradle.api.initialization.Settings>

public class RewriteSettingsPlugin extends Object implements org.gradle.api.Plugin<org.gradle.api.initialization.Settings>
Adds the Code Genome Project to pluginManagement.repositories, so that the org.openrewrite artifacts the build plugins themselves are built on resolve.

org.openrewrite.build.recipe-repositories does this for a project's own dependencies, but a plugin's classpath is resolved from the repositories settings declares, before any project exists. Those default to the Gradle Plugin Portal, which proxies Maven Central, and since recipe and language libraries stopped publishing there, org.openrewrite:rewrite-core and its siblings are no longer on it — so applying any of these plugins fails before it can configure anything.

This plugin carries no org.openrewrite dependencies of its own, which is what lets it resolve from the plugin portal alone and then make everything else resolvable.

  • Constructor Details

    • RewriteSettingsPlugin

      public RewriteSettingsPlugin()
  • Method Details

    • apply

      public void apply(org.gradle.api.initialization.Settings settings)
      Specified by:
      apply in interface org.gradle.api.Plugin<org.gradle.api.initialization.Settings>