Search Gradle plugins

Using the plugins DSL:

plugins {
  id("com.cognifide.environment") version "2.1.3"
}

Using legacy plugin application:

buildscript {
  repositories {
    maven {
      url = uri("https://plugins.gradle.org/m2/")
    }
  }
  dependencies {
    classpath("com.cognifide.gradle:environment-plugin:2.1.3")
  }
}

apply(plugin = "com.cognifide.environment")

Using the plugins DSL:

plugins {
  id "com.cognifide.environment" version "2.1.3"
}

Using legacy plugin application:

buildscript {
  repositories {
    maven {
      url "https://plugins.gradle.org/m2/"
    }
  }
  dependencies {
    classpath "com.cognifide.gradle:environment-plugin:2.1.3"
  }
}

apply plugin: "com.cognifide.environment"

Learn how to apply plugins to subprojects