Skip to content

Commit

Permalink
Update AutoValue's Gradle documentation to account for the built-in a…
Browse files Browse the repository at this point in the history
…nnotation processor configuration.

The standalone apt plugin is now only required for use on previous versions.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=190688689
  • Loading branch information
JakeWharton authored and ronshapiro committed Mar 28, 2018
1 parent bbff049 commit 83e8094
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions value/userguide/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,16 +92,20 @@ dependency to the
[`annotationProcessorPaths`](https://maven.apache.org/plugins/maven-compiler-plugin/compile-mojo.html#annotationProcessorPaths)
section.

Gradle users should install the annotation processing plugin [as described in
these instructions][tbroyer-apt] and then use it in the `build.gradle` script:
Gradle users can declare the dependencies in their `build.gradle` script:

```groovy
dependencies {
compileOnly "com.google.auto.value:auto-value-annotations:1.6"
apt "com.google.auto.value:auto-value:1.6"
// Use 'api' rather than 'compile' for Android or java-library projects.
compile "com.google.auto.value:auto-value-annotations:1.6"
annotationProcessor "com.google.auto.value:auto-value:1.6"
}
```

Note: If you are using a version of Gradle prior to 4.6, you must apply an
annotation processing plugin [as described in these instructions][tbroyer-apt]
and use the `apt` configuration instead of `annotationProcessor`.

[tbroyer-apt]: https://plugins.gradle.org/plugin/net.ltgt.apt


Expand Down

0 comments on commit 83e8094

Please sign in to comment.