How to let kapt processor depend upon ksp generate...
# ksp
k
How to let kapt processor depend upon ksp generated code? Continuing to my previous question, I have written on processor which produces Class impl of annotated interface, is it possible to integrate these Impl Classes with hilt? The problem I’m facing is, ksp cache invalidation is not letting kapt know about it, causing
symbol not found
errors when annotation is removed from source file
🔝 1
z
make the kapt tasks (stub gen and kapt) depend on the ksp task
k
Could you provide some sample snippet for that? Also, do I need to write gradle plugin for this if I’m planning ship my ksp processor as library?
I tried doing this, didn’t work
Copy code
tasks {
    withType<KaptTask>().configureEach {
        dependsOn(KspTask::class)
    }
}
Including ksp directoru into sourceSets did the trick, not sure if it’s the correct approach
Copy code
sourceSets.main {
   java.srcDirs("build/generated/ksp/main/kotlin")
}