Search Gradle plugins

Using the plugins DSL:

plugins {
  id "org.ajoberstar.git-publish" version "0.4.1-rc.1"
}

Using legacy plugin application:

buildscript {
  repositories {
    maven {
      url "https://plugins.gradle.org/m2/"
    }
  }
  dependencies {
    classpath "org.ajoberstar:gradle-git-publish:0.4.1-rc.1"
  }
}

apply plugin: "org.ajoberstar.git-publish"

Using the plugins DSL:

plugins {
  id("org.ajoberstar.git-publish") version "0.4.1-rc.1"
}

Using legacy plugin application:

buildscript {
  repositories {
    maven {
      url = uri("https://plugins.gradle.org/m2/")
    }
  }
  dependencies {
    classpath("org.ajoberstar:gradle-git-publish:0.4.1-rc.1")
  }
}

apply(plugin = "org.ajoberstar.git-publish")

Learn how to apply plugins to subprojects