Since the android gradle plugin has enabled incremental builds by default for annotation processing, because from the annotation processors only those classes that have changed since the last incremental build will be taken into account.
So, for Java source code, we usually use the apt grald plugin to start annotation processing. However, the android gradle plugin automatically disables the incremental gradle build function if apt used in the same project: https://github.com/google/dagger/issues/298
Now I am working on a kotlin project, and Im facing the same problem of incremental build with kapt . So the solution, like apt , is to disable incremental builds. The documentation states:
android { compileOptions.incremental = false ... }
However, this does not work for me. Does anyone know how to disable incremental builds?
source share