Yurii Surzhykov
02/29/2024, 7:08 PM@PersitableEvent
, which is used to annotate the class for which my KSP plugin have to generate entity class, mapper class, DAO interface and there is also autogenerated database class with all those DAOs.
The situation is the following, let's assume there is a class
@PersitableEvent
data class PreviouslyCreatedClass(
val someProperty: String
)
The problem is next. When I'm trying to compile everything from scratch(without '_build/generated'_ folder), everything works as expected, each class is generated and everything compiles and runs. But then, I'm adding a new class with @PersitableEvent
annotation, and ksp task completes successfully, but kapt shows me error:
kaptGenerateStubsDebugKotlin: Unresolved reference PreviouslyCreatedClassDao
in my AutoGeneratedDatabase class.
And there is also message below this error:
kaptGenerateStubsDebugKotlin: Failed to restore task output as snapshot file app/build/snapshot/kotlin/kaptGenerateStubsDebugKotlin/2.zip does not exist!
I don't understand what is wrong with it, but when I compile again, it compiles successfully(maybe because second time it compiles everything from scratch and not uses cache).
Can someone explain me what the error means, and how to solve it?
Currently I removed kapt plugin and the error is disappeared but I would probably need kapt in the future(for dagger).
P.s. PreviouslyCreatedClassDao
is an autogenerated class
P.p.s My Kotlin version is 1.9.20, and ksp version is 1.9.20.-1.0.14ephemient
03/01/2024, 1:15 AMephemient
03/01/2024, 1:16 AMephemient
03/01/2024, 1:17 AMYurii Surzhykov
03/01/2024, 1:24 AMephemient
03/01/2024, 1:32 AM