Skip to content

Commit

Permalink
Fix compile breakages from CL 272485203:
Browse files Browse the repository at this point in the history
1. AutoValue depends on an older version of JavaPoet than Dagger does, but Maven picks AutoValue's version, so Dagger sees:

java.lang.NoSuchMethodError: com.squareup.javapoet.ClassName.withoutAnnotations()Lcom/squareup/javapoet/ClassName;

(I thought at one point that there was a real problem with JavaPoet's binary compatibility, but I was wrong: square/javapoet#741)

2. The newer version of AutoValue is split into auto-value and auto-value-annotations. Our compile dependencies need to be on the latter.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=272884058
  • Loading branch information
cpovirk committed Oct 4, 2019
1 parent 8e6ff19 commit 7f6c128
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion caliper-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
</dependency>
<dependency>
<groupId>com.google.auto.value</groupId>
<artifactId>auto-value</artifactId>
<artifactId>auto-value-annotations</artifactId>
</dependency>
<dependency>
<groupId>junit</groupId>
Expand Down
2 changes: 1 addition & 1 deletion caliper-runner/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
</dependency>
<dependency>
<groupId>com.google.auto.value</groupId>
<artifactId>auto-value</artifactId>
<artifactId>auto-value-annotations</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
Expand Down
10 changes: 8 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@
</dependency>
<dependency>
<groupId>com.google.auto.value</groupId>
<artifactId>auto-value</artifactId>
<artifactId>auto-value-annotations</artifactId>
<version>${autovalue.version}</version>
</dependency>
<dependency>
Expand Down Expand Up @@ -176,7 +176,7 @@
<source>1.8</source>
<target>1.8</target>
<annotationProcessorPaths>
<path>
<path>
<groupId>com.google.auto.value</groupId>
<artifactId>auto-value</artifactId>
<version>${autovalue.version}</version>
Expand All @@ -186,6 +186,12 @@
<artifactId>dagger-compiler</artifactId>
<version>${dagger.version}</version>
</path>
<!-- TODO(cpovirk): Remove this after updating AutoValue's dep. -->
<path>
<groupId>com.squareup</groupId>
<artifactId>javapoet</artifactId>
<version>1.11.1</version>
</path>
</annotationProcessorPaths>
</configuration>
</plugin>
Expand Down

0 comments on commit 7f6c128

Please sign in to comment.