Hello! I have a class that I want to process and c...
# ksp
v
Hello! I have a class that I want to process and create a metadata class based on the field types. This class has an enum field. The enum declaration is located in a different gradle module. The problem is that the
KSDeclaration
of this enum does not contain the
ENUM
modifier (It has only the following modifiers:
PUBLIC
,
FINAL
). If I move the enum class into the same gradle module then the
KSDeclarartion
will have the correct modifiers. Is there some sort of limitation with multi-module projects or is it a bug?
a
I also recently experienced this issue. Seems like a bug, but there is a workaround:
Copy code
declaration.classKind == ClassKind.ENUM_CLASS
v
I ll try it. The problem with this workaround is that it can not work with sealed classes. I have a sealed class field too and ClassKind does not have a value for sealed classes :(
a
Found an old issue, left a comment @Jiaxiang
👍 1
j
see my reply on Github.