搜索 Gradle 插件

使用plugins DSL

plugins {
  id("io.github.turansky.kfc.maven-publish") version "5.133.0"
}

使用旧的插件应用程序

buildscript {
  repositories {
    maven {
      url = uri("https://plugins.gradle.org.cn/m2/")
    }
  }
  dependencies {
    classpath("io.github.turansky.kfc:kfc-gradle-plugin:5.133.0")
  }
}

apply(plugin = "io.github.turansky.kfc.maven-publish")

使用plugins DSL

plugins {
  id "io.github.turansky.kfc.maven-publish" version "5.133.0"
}

使用旧的插件应用程序

buildscript {
  repositories {
    maven {
      url "https://plugins.gradle.org.cn/m2/"
    }
  }
  dependencies {
    classpath "io.github.turansky.kfc:kfc-gradle-plugin:5.133.0"
  }
}

apply plugin: "io.github.turansky.kfc.maven-publish"

学习如何将插件应用到子项目