Understanding annotationProcessor, kapt, ksp in Gradle In Gradle, annotationProcessor is a dependency configuration used for specifying dependencies that are annotation processors. Annotation processors are tools that run during the compilation process and can generate code, modify existing code, or perform other actions based on annotations in your source code. annotationProcessor "com . google . dagger:dagger-compiler:version" kapt(Kotlin Annotation Processing Tool) and ksp(Kotlin Symbol Processing) do the same things but for Kotlin projects with some improvements. As the name says, kapt is for the Kotlin project. kapt lets us use Java annotation processors with Kotlin code, even if those processors don't have specific support for Kotlin. This is done by generating Java stubs from your Kotlin files that the processors can then read. This stub generation is an expensive operation and has a significant impact on build speed. kapt "com . google . dagger:dagger-compiler:version" ksp is a Kotlin-first alternative to kapt. ksp analyzes Kotlin code directly, which is up to 2x faster. It also has a better understanding of Kotlin language constructs. ksp "com . google . dagger:dagger-compiler:version" So, now for the Kotlin project, it is recommended to use ksp. That's it for now. Follow Outcome School for knowledge-packed content. Keep Learning, Keep Sharing, and Keep Growing. Software engineers like you join Outcome School to achieve the outcome that is a high-paying tech job. Join Outcome School: https://outcomeschool.com #OutcomeSchool #SoftwareEngineer #Tech #AndroidDev #Android #Kotlin
Great advice
Very informative
AMIT SHEKHAR KSP sounds like a real time-saver for Kotlin projects! 🚀 #Kotlin #AndroidDev
Interesting
Very informative
Well explained, and very informative! Thanks for sharing 👍
Follow Outcome School for knowledge-packed content.
Android dev by day, Creator by night.🥷🏻 Sharing my passion through videos, blogs and conferences.🚀
1moDoes Ksp not support Java annotation processors? If it does, how does it work without generating Java stubs for Java annotation processors? Kudos to you and Outcome school for sharing quality content for Mid-Senior Android developers!! Keep growing!