搜索Gradle插件

使用 plugins DSL

plugins {
  id("com.github.turansky.kfc.maven-central-publish") version "4.88.0"
}

使用 旧版插件应用

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

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

使用 plugins DSL

plugins {
  id "com.github.turansky.kfc.maven-central-publish" version "4.88.0"
}

使用 旧版插件应用

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

apply plugin: "com.github.turansky.kfc.maven-central-publish"

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