Grégory Lureau
10/01/2021, 3:28 PMResolver.getSymbolsWithAnnotation
only returns annotations available in the same compilation/gradle module for KMP. When I move the annotation to another module (dedicated to annotations) it's not returned anymore. Have you already experienced something similar ?evant
10/01/2021, 4:01 PMJiaxiang
10/01/2021, 7:50 PMResolver.getSymbolsWithAnnotation
only look annotations present in the current compile module, it is not practical to look into dependencies, too.Grégory Lureau
10/01/2021, 8:44 PMJiaxiang
10/01/2021, 8:44 PMGrégory Lureau
10/01/2021, 8:48 PMJiaxiang
10/01/2021, 8:50 PMJiaxiang
10/01/2021, 8:51 PMlib.jar
and use that annotation to annotate a symbol @Anno class C
then you should be able to get C
by calling getSymbolsAnnotatedWith()
Grégory Lureau
10/01/2021, 9:03 PMgetSymbolsAnnotatedWith()
returns nothing, but if I copy/paste the annotation class from A to C (same name, same package), then getSymbolsAnnotatedWith()
returns some classes to process.
It's a KMP project so it may be a bit different I suppose, I'd like to define the compiler only for JS, so my gradle looks like this
kotlin {
js(IR) { ...}
// other platforms
sourceSets {
val jsMain by getting {
kotlin.srcDir("build/generated/ksp/jsMain/kotlin")
dependencies {
configurations["ksp"].dependencies.add(project(":ExportCompiler"))
}
}Grégory Lureau
10/01/2021, 9:05 PMGrégory Lureau
10/01/2021, 9:17 PMglureau
10/09/2021, 12:58 PM