Search Gradle plugins

Using the plugins DSL:

plugins {
  id("org.openrewrite.build.java-base") version "1.17.4"
}

Using legacy plugin application:

buildscript {
  repositories {
    maven {
      url = uri("https://plugins.gradle.org/m2/")
    }
  }
  dependencies {
    classpath("org.openrewrite:rewrite-build-gradle-plugin:1.17.4")
  }
}

apply(plugin = "org.openrewrite.build.java-base")

Using the plugins DSL:

plugins {
  id "org.openrewrite.build.java-base" version "1.17.4"
}

Using legacy plugin application:

buildscript {
  repositories {
    maven {
      url "https://plugins.gradle.org/m2/"
    }
  }
  dependencies {
    classpath "org.openrewrite:rewrite-build-gradle-plugin:1.17.4"
  }
}

apply plugin: "org.openrewrite.build.java-base"

Learn how to apply plugins to subprojects