How Yatagan improves build performance
mainYatagan achieves faster builds (potentially up to 2x faster incremental builds) by reducing the scope of annotation processing.
In a standard Dagger setup, every module with DI code requires an annotation processor. In Yatagan, you only apply processing to modules containing root components (@Component(isRoot = true)).
Optimization Strategy:
- Apply Yatagan processing only to root-component modules.
- For all other modules, use only the
api-publicdependency (no KAPT/KSP). - In debug environments, use the Reflection backend to remove KAPT/KSP from the build pipeline entirely in many modules.