搜索 Gradle 插件

使用 plugins DSL

plugins {
  id("com.blackbuild.annodocimal.plugin") version "0.5.0"
}

使用 遗留插件应用

buildscript {
  repositories {
    maven {
      url = uri("https://plugins.gradle.org.cn/m2/")
    }
  }
  dependencies {
    classpath("com.blackbuild.annodocimal:anno-docimal-gradle-plugin:0.5.0")
  }
}

apply(plugin = "com.blackbuild.annodocimal.plugin")

使用 plugins DSL

plugins {
  id "com.blackbuild.annodocimal.plugin" version "0.5.0"
}

使用 遗留插件应用

buildscript {
  repositories {
    maven {
      url "https://plugins.gradle.org.cn/m2/"
    }
  }
  dependencies {
    classpath "com.blackbuild.annodocimal:anno-docimal-gradle-plugin:0.5.0"
  }
}

apply plugin: "com.blackbuild.annodocimal.plugin"

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