Search Gradle plugins

Using the plugins DSL:

plugins {
  id("org.sonatype.gradle.plugins.scan") version "2.5.2"
}

Using legacy plugin application:

buildscript {
  repositories {
    maven {
      url = uri("https://plugins.gradle.org/m2/")
    }
  }
  dependencies {
    classpath("org.sonatype.gradle.plugins:scan-gradle-plugin:2.5.2")
  }
}

apply(plugin = "org.sonatype.gradle.plugins.scan")

Using the plugins DSL:

plugins {
  id "org.sonatype.gradle.plugins.scan" version "2.5.2"
}

Using legacy plugin application:

buildscript {
  repositories {
    maven {
      url "https://plugins.gradle.org/m2/"
    }
  }
  dependencies {
    classpath "org.sonatype.gradle.plugins:scan-gradle-plugin:2.5.2"
  }
}

apply plugin: "org.sonatype.gradle.plugins.scan"

Learn how to apply plugins to subprojects