#982·auto

Support KSP for AutoFactory

Author: davidjwinerCreated Feb 3, 2021Updated Feb 10, 2026
LabelsComponent: factoryP3type=enhancement

For Kotlin projects, AutoFactory currently makes use of KAPT. This is generally quite slow since it requires generating Java stubs before the annotation processing step.

KSP offers an alternative to this by making it easier for annotation processors like AutoFactory to more directly use Kotlin's compiler plugin infrastructure. Based on initial benchmarks, using KSP can speed up build times by as much as 2x.