Search Gradle plugins

Using the plugins DSL:

plugins {
  id("io.swagger.core.v3.swagger-gradle-plugin") version "2.1.12"
}

Using legacy plugin application:

buildscript {
  repositories {
    maven {
      url = uri("https://plugins.gradle.org/m2/")
    }
  }
  dependencies {
    classpath("io.swagger.core.v3:swagger-gradle-plugin:2.1.12")
  }
}

apply(plugin = "io.swagger.core.v3.swagger-gradle-plugin")

Using the plugins DSL:

plugins {
  id "io.swagger.core.v3.swagger-gradle-plugin" version "2.1.12"
}

Using legacy plugin application:

buildscript {
  repositories {
    maven {
      url "https://plugins.gradle.org/m2/"
    }
  }
  dependencies {
    classpath "io.swagger.core.v3:swagger-gradle-plugin:2.1.12"
  }
}

apply plugin: "io.swagger.core.v3.swagger-gradle-plugin"

Learn how to apply plugins to subprojects