Search Gradle plugins

Using the plugins DSL:

plugins {
  id "com.testvagrant.optimus.plugin" version "3.0.1"
}

Using legacy plugin application:

buildscript {
  repositories {
    maven {
      url "https://plugins.gradle.org/m2/"
    }
  }
  dependencies {
    classpath "gradle.plugin.com.testvagrant.optimus:OptimusGradle:3.0.1"
  }
}

apply plugin: "com.testvagrant.optimus.plugin"

Using the plugins DSL:

plugins {
  id("com.testvagrant.optimus.plugin") version "3.0.1"
}

Using legacy plugin application:

buildscript {
  repositories {
    maven {
      url = uri("https://plugins.gradle.org/m2/")
    }
  }
  dependencies {
    classpath("gradle.plugin.com.testvagrant.optimus:OptimusGradle:3.0.1")
  }
}

apply(plugin = "com.testvagrant.optimus.plugin")

Learn how to apply plugins to subprojects