Search Gradle plugins

Using the plugins DSL:

plugins {
  id("io.gitlab.arturbosch.detekt") version "1.0.0.RC7"
}

Using legacy plugin application:

buildscript {
  repositories {
    maven {
      url = uri("https://plugins.gradle.org/m2/")
    }
  }
  dependencies {
    classpath("gradle.plugin.io.gitlab.arturbosch.detekt:detekt-gradle-plugin:1.0.0.RC7")
  }
}

apply(plugin = "io.gitlab.arturbosch.detekt")

Using the plugins DSL:

plugins {
  id "io.gitlab.arturbosch.detekt" version "1.0.0.RC7"
}

Using legacy plugin application:

buildscript {
  repositories {
    maven {
      url "https://plugins.gradle.org/m2/"
    }
  }
  dependencies {
    classpath "gradle.plugin.io.gitlab.arturbosch.detekt:detekt-gradle-plugin:1.0.0.RC7"
  }
}

apply plugin: "io.gitlab.arturbosch.detekt"

Learn how to apply plugins to subprojects