Search Gradle plugins

Using the plugins DSL:

plugins {
  id("org.sonarqube") version "2.2.1"
}

Using legacy plugin application:

buildscript {
  repositories {
    maven {
      url = uri("https://plugins.gradle.org/m2/")
    }
  }
  dependencies {
    classpath("org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:2.2.1")
  }
}

apply(plugin = "org.sonarqube")

Using the plugins DSL:

plugins {
  id "org.sonarqube" version "2.2.1"
}

Using legacy plugin application:

buildscript {
  repositories {
    maven {
      url "https://plugins.gradle.org/m2/"
    }
  }
  dependencies {
    classpath "org.sonarsource.scanner.gradle:sonarqube-gradle-plugin:2.2.1"
  }
}

apply plugin: "org.sonarqube"

Learn how to apply plugins to subprojects