I have the following data class annotated with @MyAnnotation
:
@MyAnnotation
data class MyDataClass(
val foo: Boolean = true,
val bar: Int = 123,
val buz: String? = "abc",
)
From the ClassDeclaration
I can get all the KSPropertyDeclaration
, and I'm able to get the simpleName
and resolve the KSType
, but I don't know how to get the default values of each property.
Currently it's not supported by google, please check here https://github.com/google/ksp/issues/642