Search Gradle plugins

Using the plugins DSL:

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

Using legacy plugin application:

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

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

Using the plugins DSL:

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

Using legacy plugin application:

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

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

Learn how to apply plugins to subprojects