I need to resolve members (+ ideally kdocs) of a c...
# compiler
h
I need to resolve members (+ ideally kdocs) of a class from other modules/dependencies. At the moment I use a ksp plugin but I can't access compiled modules/dependencies. If I migrate to a compiler plugin, do I still have the same limitation to access only the current module? What about the Analysis API?
m
Not sure if it can solve all your issues but you can get symbols from the whole compile classpath with KSP using
getDeclarationsFromPackage()
https://github.com/google/ksp/issues/1075#issuecomment-1222658918
j
In FIR I was able to access to dependencies from CLI, on IDE they are empty
o
kdocs are currently available only when you are working with sources Analysis API allows to create modules to analyze from sources, so theoretically you can create an AA session which will work over multiple modules from sources. (in case of dependencies, you will need to download
-sources.jar
additionally) BTW, what do you want to do with kdocs ? 🙂
h
Thanks, will try it. FIR with cli would be fine, I don’t need IDE support. I want to generate an OpenApi file for an annotated function and read its parameters and the return type. This works well in the same module but I want to refactor my code base into multiple modules but this breaks the OpenApi generator. So I need to access other modules. And ideally, the OpenApi also contains the kdoc from the classes, at least in my code base (with sources) excluding external dependencies.
thank you color 1