I\'d like to use AspectJ in Gradle project (it\'s not an Android project - just a simple Java app).
Here is how my build.gradle looks like:
apply plugin
Adding this in my build.gradle file worked for me.
project.ext {
aspectjVersion = '1.8.12'
}
apply plugin: "aspectj.gradle"
buildscript {
repositories {
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath "gradle.plugin.aspectj:gradle-aspectj:0.1.6"
}
}
Doing a gradle assemble
injected the code defined in the aspect.