Search Gradle plugins

Using the plugins DSL:

plugins {
  id("org.danilopianini.gradle-pre-commit-git-hooks") version "2.0.15"
}

Using legacy plugin application:

buildscript {
  repositories {
    maven {
      url = uri("https://plugins.gradle.org/m2/")
    }
  }
  dependencies {
    classpath("org.danilopianini:gradle-pre-commit-git-hooks:2.0.15")
  }
}

apply(plugin = "org.danilopianini.gradle-pre-commit-git-hooks")

Using the plugins DSL:

plugins {
  id "org.danilopianini.gradle-pre-commit-git-hooks" version "2.0.15"
}

Using legacy plugin application:

buildscript {
  repositories {
    maven {
      url "https://plugins.gradle.org/m2/"
    }
  }
  dependencies {
    classpath "org.danilopianini:gradle-pre-commit-git-hooks:2.0.15"
  }
}

apply plugin: "org.danilopianini.gradle-pre-commit-git-hooks"

Learn how to apply plugins to subprojects