搜索Gradle插件

使用插件 DSL

plugins {
  id("io.freefair.aspectj.compile-time-weaving") version "3.8.4"
}

使用旧插件应用

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

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

使用插件 DSL

plugins {
  id "io.freefair.aspectj.compile-time-weaving" version "3.8.4"
}

使用旧插件应用

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

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

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