Search Gradle plugins

Using the plugins DSL:

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

Using legacy plugin application:

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

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

Using the plugins DSL:

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

Using legacy plugin application:

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

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

Learn how to apply plugins to subprojects