Search Gradle plugins

Using the plugins DSL:

plugins {
  id("org.openrewrite.build.java8-text-blocks") version "1.11.6"
}

Using legacy plugin application:

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

apply(plugin = "org.openrewrite.build.java8-text-blocks")

Using the plugins DSL:

plugins {
  id "org.openrewrite.build.java8-text-blocks" version "1.11.6"
}

Using legacy plugin application:

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

apply plugin: "org.openrewrite.build.java8-text-blocks"

Learn how to apply plugins to subprojects