Dagger: Dagger compiler not incremental after upgrading to 2.23

Created on 29 May 2019  Â·  6Comments  Â·  Source: google/dagger

After upgrading to Dagger 2.23 we noticed that Gradle started reporting the Dagger compiler as a non-incremental annotation processor:

Gradle may disable incremental compilation as the following annotation processors are not incremental: dagger-compiler-2.23.jar (com.google.dagger:dagger-compiler:2.23), dagger-android-processor-2.23.jar (com.google.dagger:dagger-android-processor:2.23).
Consider setting the experimental feature flag android.enableSeparateAnnotationProcessing=true in the gradle.properties file to run annotation processing in a separate task and make compilation incremental.

Not sure if it's a problem but comparing the 2.23 jar with the 2.22.1 one we noticed that the Gradle configuration file is not in the top level META-INF folder:

➜  ~ find **/incremental*
dagger-compiler-2.22.1/META-INF/gradle/incremental.annotation.processors
dagger-compiler-2.23/java/dagger/internal/codegen/META-INF/gradle/incremental.annotation.processors

Most helpful comment

I've got a fix out internally, I hope to have this resolved and push a new version shortly

All 6 comments

argh. Ok, I'll try to fix this. Thanks for reporting this

simple_jar has always been hard to verify and get right, and it looks like one of the changes we made to make it support other bazel repositories broke this.

I'm not sure why I never used @tbroyer's https://github.com/tbroyer/gradle-incap-helper, but that should allow us to get rid of simple_jar.

I've got a fix out internally, I hope to have this resolved and push a new version shortly

I'm releasing 2.23.1 now. I've verified locally that the artifact has the correct META-INF file. Thanks for your patience here, and sorry again for the issue!

2.23.1 should be available on Maven Central now.

Thank you for the prompt fix!

Was this page helpful?
0 / 5 - 0 ratings