I am using Gradle to build an Android Studio project. I am using auto-value in one of my modules but for some reason, any version of auto-value higher than 1.5.3 causes a compilation failure.
My dependency in build.gradle for the module looks like this:
annotationProcessor 'com.google.auto.value:auto-value:1.5.3'
If I just change that 1.5.3 to 1.6.5, I get the following error when building (syncing works fine):
Annotation processors must be explicitly declared now. The following dependencies on the compile classpath are found to contain annotation processor. Please add them to the annotationProcessor configuration.
- auto-value-1.5.3.jar (com.google.auto.value:auto-value:1.5.3)
Alternatively, set android.defaultConfig.javaCompileOptions.annotationProcessorOptions.includeCompileClasspath = true to continue with previous behavior. Note that this option is deprecated and will be removed in the future.
See https://developer.android.com/r/tools/annotation-processor-error-message.html for more details.
I even tried using the recommended instructions on the documentation:
api "com.google.auto.value:auto-value-annotations:1.6.2"
annotationProcessor "com.google.auto.value:auto-value:1.6.2"
Any clue what to do here?