1

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?

eyllanesc
  • 235,170
  • 19
  • 170
  • 241
sohum
  • 3,207
  • 2
  • 39
  • 63
  • have you tried `compileOnly`, `implementationOnly`, `compile`, or `implementation` instead of `api` in `api "com.google.auto.value:auto-value-annotations:1.6.2"` ? – elyar abad Aug 18 '19 at 03:35
  • Looks like this might be because I am using auto-factory:1.0beta6. It looks like that is including the 1.5.3 dep. Is there any way to get around? – sohum Aug 18 '19 at 03:48

0 Answers0