搜索Gradle插件

使用插件DSL

plugins {
  id("com.destroystokyo.papergradle") version "2.3.19"
}

使用旧插件应用程序

buildscript {
  repositories {
    maven {
      url = uri("https://plugins.gradle.org.cn/m2/")
    }
  }
  dependencies {
    classpath("gradle.plugin.com.destroystokyo.papergradle:PaperGradle:2.3.19")
  }
}

apply(plugin = "com.destroystokyo.papergradle")

使用插件DSL

plugins {
  id "com.destroystokyo.papergradle" version "2.3.19"
}

使用旧插件应用程序

buildscript {
  repositories {
    maven {
      url "https://plugins.gradle.org.cn/m2/"
    }
  }
  dependencies {
    classpath "gradle.plugin.com.destroystokyo.papergradle:PaperGradle:2.3.19"
  }
}

apply plugin: "com.destroystokyo.papergradle"

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