You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Then the Java Project has a class with that annotation:
@MyCustomAnnotationpublicclassTestClass {
}
When the Java project calls the getClassesWithAnnotation() from the library, it gets an empty list, showing that the classes in the Java project were not scanned.
The text was updated successfully, but these errors were encountered:
I'm not a Gradle user myself, but I guess this is due to Gradle not doing a proper annotation processor discovery anymore. You probably need to add an additional annotationProcessor("app.libs.io:my-library:2.0.0.8-SNAPSHOT") dependency in the projects that are using your library.
Assuming you have a library
my-library
with the following dependencies:And a custom annotation:
And a method in the library to get all classes with that annotation:
And then the library is imported into another Java project as follows:
implementation("app.libs.io:my-library:2.0.0.8-SNAPSHOT")
Then the Java Project has a class with that annotation:
When the Java project calls the
getClassesWithAnnotation()
from the library, it gets an empty list, showing that the classes in the Java project were not scanned.The text was updated successfully, but these errors were encountered: