Rohil Chodankar
12/14/2021, 11:25 AMKAPT
to KSP
in our android project. We have one internal processor that generates an extension function to convert a String into respective class type. Code snippet below. Everything works well and ksp
generates the class. The problem I am facing is that some classes have companion object function that try to access the generated function. The IDE fails to resolve the generated function (although i have marked the generated path as explained) and intermittently the build task fails.
@MyAnnotation
enum class Test {
@Field(name = "value1") value1,
@Field(name = "value2") value2,
companion object {
fun fromString(value: String?): Test? = value?.toTest()
}
}