搜索Gradle插件

使用插件DSL

plugins {
  id("io.freefair.javadocs") version "8.7.1"
}

使用遗留插件应用

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

apply(plugin = "io.freefair.javadocs")

使用插件DSL

plugins {
  id "io.freefair.javadocs" version "8.7.1"
}

使用遗留插件应用

buildscript {
  repositories {
    maven {
      url "https://plugins.gradle.org.cn/m2/"
    }
  }
  dependencies {
    classpath "io.freefair.gradle:maven-plugin:8.7.1"
  }
}

apply plugin: "io.freefair.javadocs"

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