Search Gradle plugins

Using the plugins DSL:

plugins {
  id("org.springframework.cloud.contract") version "2.1.2.RELEASE"
}

Using legacy plugin application:

buildscript {
  repositories {
    maven {
      url = uri("https://plugins.gradle.org/m2/")
    }
  }
  dependencies {
    classpath("gradle.plugin.org.springframework.cloud:spring-cloud-contract-gradle-plugin:2.1.2.RELEASE")
  }
}

apply(plugin = "org.springframework.cloud.contract")

Using the plugins DSL:

plugins {
  id "org.springframework.cloud.contract" version "2.1.2.RELEASE"
}

Using legacy plugin application:

buildscript {
  repositories {
    maven {
      url "https://plugins.gradle.org/m2/"
    }
  }
  dependencies {
    classpath "gradle.plugin.org.springframework.cloud:spring-cloud-contract-gradle-plugin:2.1.2.RELEASE"
  }
}

apply plugin: "org.springframework.cloud.contract"

Learn how to apply plugins to subprojects