Search Gradle plugins

Using the plugins DSL:

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

Using legacy plugin application:

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

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

Using the plugins DSL:

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

Using legacy plugin application:

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

apply plugin: "com.cognifide.environment"

Learn how to apply plugins to subprojects