How do you exclude aspects with io.freefair.aspectj.post-compile-weaving? #471
-
I have a Gradle 7.3.3 aspect library and a Gradle 7.3.3 project which consumes that library. I am applying the 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 I have tried quite a few different iterations of ajc configuration, including messing with compileJava {
ajc {
options {
aspectpath.minus files()
aspectpath.setFrom configurations.aspect
}
}
} Is it possible to exclude aspects with the |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
I don't think it's possible to exclude a specific class from being processed, because the whole compiler output directory ( You could try to move your Spring AOP aspect to a different subproject, which does not have the post-compile-weaving applied |
Beta Was this translation helpful? Give feedback.
I don't think it's possible to exclude a specific class from being processed, because the whole compiler output directory (
build/classes/java/main
) is passed to ajc as-inpath
.You could try to move your Spring AOP aspect to a different subproject, which does not have the post-compile-weaving applied