Working on an Android library using Gradle, Kotlin...
# kapt
r
Working on an Android library using Gradle, Kotlin and a 3rd-party codegen plugin using kapt, is there a way to have kapt generate sources but to prevent these files being included in the module build artifacts? I am hoping to be able to split the kapt output into a separate AAR (dependent on the original library), avoiding a trail of unnecessary dependencies for those who don't need the generated classes.
Things which don't work:
android.sourceSets.main.java { exclude 'path' }
,
android.packagingOptions { exclude 'path' }
. Can't see a way to configure how Android generates the classes.jar either, so presumably this needs some detailed knowledge of how kapt files are included in the build