Search Gradle plugins

Using the plugins DSL:

plugins {
  id("se.bjurr.violations.violations-gradle-plugin") version "1.24"
}

Using legacy plugin application:

buildscript {
  repositories {
    maven {
      url = uri("https://plugins.gradle.org/m2/")
    }
  }
  dependencies {
    classpath("gradle.plugin.se.bjurr.violations:violations-gradle-plugin:1.24")
  }
}

apply(plugin = "se.bjurr.violations.violations-gradle-plugin")

Using the plugins DSL:

plugins {
  id "se.bjurr.violations.violations-gradle-plugin" version "1.24"
}

Using legacy plugin application:

buildscript {
  repositories {
    maven {
      url "https://plugins.gradle.org/m2/"
    }
  }
  dependencies {
    classpath "gradle.plugin.se.bjurr.violations:violations-gradle-plugin:1.24"
  }
}

apply plugin: "se.bjurr.violations.violations-gradle-plugin"

Learn how to apply plugins to subprojects