搜索 Gradle 插件

使用 plugins DSL

plugins {
  id("io.freefair.aspectj.post-compile-weaving") version "8.7.1"
}

使用 旧式插件应用

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

apply(plugin = "io.freefair.aspectj.post-compile-weaving")

使用 plugins DSL

plugins {
  id "io.freefair.aspectj.post-compile-weaving" version "8.7.1"
}

使用 旧式插件应用

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

apply plugin: "io.freefair.aspectj.post-compile-weaving"

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