there is no guarantee of execution order for KSP and KAPT, therefore while technically you can analyze by adding KAPT generated folder to source set, you are running a risk of KSP task executing before KAPT and not getting any generated source at all.