would it be possible for a compiler plugin to retr...
# compiler
e
would it be possible for a compiler plugin to retrieve all the classes with a specific annotation, in third dependencies as well, in multiplatform?
f
yes, but it depends on what you want to do with those classes. Basically you need a plugin that hooks into the linking phase that produces the framework. I’ve described this approach in this thread: https://kotlinlang.slack.com/archives/C7L3JB43G/p1698116255957259
e
I'll like to collect those classes to instantiate them later on I'm investigating how to get this behavior of Scijava in Kotlin multiplatform But I'm evaluating also KSP at the moment, I'm kind of afraid a compiler plugin would be overkill (I'm totally unfamiliar with them)
f
Yeah KSP would be a preferred solution for this. You might want to take a look at the implementation of KMP-NativeCoroutines and Moko-kswift
e
why, are they doing something similar?
f
yes, but each has a slightly different approach if I remember correctly.