搜索Gradle插件

使用插件DSL

plugins {
  id("pl.allegro.tech.build.axion-release") version "1.18.5"
}

使用旧插件应用

buildscript {
  repositories {
    maven {
      url = uri("https://plugins.gradle.org.cn/m2/")
    }
  }
  dependencies {
    classpath("pl.allegro.tech.build:axion-release-plugin:1.18.5")
  }
}

apply(plugin = "pl.allegro.tech.build.axion-release")

使用插件DSL

plugins {
  id "pl.allegro.tech.build.axion-release" version "1.18.5"
}

使用旧插件应用

buildscript {
  repositories {
    maven {
      url "https://plugins.gradle.org.cn/m2/"
    }
  }
  dependencies {
    classpath "pl.allegro.tech.build:axion-release-plugin:1.18.5"
  }
}

apply plugin: "pl.allegro.tech.build.axion-release"

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