Hello there :wave: is there a way to scan sources ...
# ksp
a
Hello there 👋 is there a way to scan sources accross multiple gradle modules while using
resolver.getSymbolsWithAnnotation(...)
?
z
that’s almost certainly not something you want to do 🤔
👍 1
👍🏼 1
incremental processing certainly wouldn’t be able to work with that
☝️ 1
a
yeah, I believe this is more something like classpath scanning that would achieve such thing
j
modules are treated as libraries in compiler, therefore it is not supported.
a
However, sometimes it is needed. Fox example: airbnb's Showkase library uses this technique (source code). Also, crab library
j
the code you linked does not seem to be calling
getSymbolsWithAnnotation
equivalent? You can still try to access symbols from other modules, using indirect reference or fully qualified name. But still, that might also be a nightmare for incremental.
a
They are placing classes, annotated with useful info, in each module with the same package name, then collect them in the root module using
Resolver.getDeclarationsFromPackage
.
a
thanks for your messages