I have a Gradle 7.3.3 aspect library and a Gradle 7.3.3 project which consumes that library. I am applying the io.freefair.aspectj.post-compile-weaving
Gradle plugin in the project.
plugins {
id 'io.freefair.aspectj.post-compile-weaving' version '6.3.0'
}
I am then adding the library to the project as an aspect dependency.
dependencies {
aspect 'com.example:my-aspect-lib:0.0.1'
}
Aside from the library aspects that I want to weave post-compile, the project itself has aspects that I want Spring AOP to handle at runtime. Those aspects must not be woven post-compile. However, the default behavior of post-compile-weaving
is to weave all aspects in the project.
I have tried quite a few different iterations of ajc configuration, including messing with compilerArgs
, but so far I have not been able to exclude the project aspects from post-compile weaving.
compileJava {
ajc {
options {
aspectpath.minus files()
aspectpath.setFrom configurations.aspect
}
}
}
Is it possible to exclude aspects with the post-compile-weaving
plugin?
I also asked this question here but as of this post have not yet received any response.