Search Gradle plugins

Using the plugins DSL:

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

Using legacy plugin application:

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

apply(plugin = "org.sonarqube")

Using the plugins DSL:

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

Using legacy plugin application:

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

apply plugin: "org.sonarqube"

Learn how to apply plugins to subprojects