搜索 Gradle 插件

使用 plugins DSL

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

使用 旧版插件应用

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

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

使用 plugins DSL

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

使用 旧版插件应用

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

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

了解如何将插件应用到子项目中