Search Gradle plugins

Using the plugins DSL:

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

Using legacy plugin application:

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

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

Using the plugins DSL:

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

Using legacy plugin application:

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

apply plugin: "com.cognifide.environment"

Learn how to apply plugins to subprojects