Search Gradle plugins

Using the plugins DSL:

plugins {
  id("com.squareup.wire") version "4.6.0"
}

Using legacy plugin application:

buildscript {
  repositories {
    maven {
      url = uri("https://plugins.gradle.org/m2/")
    }
  }
  dependencies {
    classpath("com.squareup.wire:wire-gradle-plugin:4.6.0")
  }
}

apply(plugin = "com.squareup.wire")

Using the plugins DSL:

plugins {
  id "com.squareup.wire" version "4.6.0"
}

Using legacy plugin application:

buildscript {
  repositories {
    maven {
      url "https://plugins.gradle.org/m2/"
    }
  }
  dependencies {
    classpath "com.squareup.wire:wire-gradle-plugin:4.6.0"
  }
}

apply plugin: "com.squareup.wire"

Learn how to apply plugins to subprojects