I'm writing a custom gradle plugin that does some code generation. I would like to automatically generate all non-ambiguous imports. I can scan project sources files with Ktlint, scan all dependencies with something like ASM, and build my own symbol dictionary. But this is a rather tedious perspective, and if I want to optimize the compilation for speed, I'll need a cache, so I'll have to handle cache freshness, etc. Since idea is obviously doing the same thing when it suggests imports, I was wondering if there is some open source code I could reuse for this task. I did not yet dig into IC sources.