搜索Gradle插件

使用插件DSL

plugins {
  id("io.freefair.javadoc-jar") version "5.3.3.3"
}

使用旧版插件应用

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

apply(plugin = "io.freefair.javadoc-jar")

使用插件DSL

plugins {
  id "io.freefair.javadoc-jar" version "5.3.3.3"
}

使用旧版插件应用

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

apply plugin: "io.freefair.javadoc-jar"

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