https://kotlinlang.org logo
Title
d

Dmitriy Tarasevich

04/10/2022, 7:25 PM
I'm running into an issue where
getSymbolsWithAnnotation
returns 0 symbols when my modules are only targeting the
jvm
. If i re-add my
js
or
ios
targets it picks up the annotations correctly.
If i run
kspJvmMain
instead of
kspCommonMainMetadata
it seems to work but it puts all the generated files into the /jvm directory instead of common
j

Jiaxiang

04/11/2022, 12:54 AM
can you give a reproduce case for this issue? We have integration tests for kmp and hasn’t seen this issue.
d

Dmitriy Tarasevich

04/11/2022, 1:23 AM
can you point me to a sample in which you have just jvm set up?
I can spend some time getting together a smaller sample as our current project is a bit large to post somewhere. But in short we have many modules which are we are initializing with
kotlin {
 jvm()
}
and then adding a dependency on the processor with
add("kspCommonMainMetadata", project(":x-processor"))
j

Jiaxiang

04/11/2022, 1:38 AM
here is the sample
d

Dmitriy Tarasevich

04/11/2022, 1:59 AM
interesting
there must be something else in my set up that is preventing this
at this point I have to add something other than android to have commonMetadata be able to see the annotations