搜索Gradle插件

使用插件DSL

plugins {
  id("com.xenoterracide.gradle.code-quality") version "0.5.3-2-g7beba77"
}

使用旧版插件应用

buildscript {
  repositories {
    maven {
      url = uri("https://plugins.gradle.org.cn/m2/")
    }
  }
  dependencies {
    classpath("gradle.plugin.com.xenoterracide.gradle:gradle-plugin-bundle:0.5.3-2-g7beba77")
  }
}

apply(plugin = "com.xenoterracide.gradle.code-quality")

使用插件DSL

plugins {
  id "com.xenoterracide.gradle.code-quality" version "0.5.3-2-g7beba77"
}

使用旧版插件应用

buildscript {
  repositories {
    maven {
      url "https://plugins.gradle.org.cn/m2/"
    }
  }
  dependencies {
    classpath "gradle.plugin.com.xenoterracide.gradle:gradle-plugin-bundle:0.5.3-2-g7beba77"
  }
}

apply plugin: "com.xenoterracide.gradle.code-quality"

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