diff options
author | rayt <rayt@google.com> | 2020-07-14 16:27:21 -0700 |
---|---|---|
committer | David P. Baker <dpb@google.com> | 2020-07-15 12:46:37 -0400 |
commit | 43ff5f2d34e7ac88bd0722281d07303618c85a07 (patch) | |
tree | 74a7f6f066c3ebd3d58ba44ac1b7932280880547 | |
parent | b48441776bb1eefe120dd4de5711e50209f46917 (diff) | |
download | auto-43ff5f2d34e7ac88bd0722281d07303618c85a07.tar.gz |
AutoValue annotation can be provided scope.
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=321258257
-rw-r--r-- | value/userguide/index.md | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/value/userguide/index.md b/value/userguide/index.md index 8cbe75fc..2e05d54b 100644 --- a/value/userguide/index.md +++ b/value/userguide/index.md @@ -92,6 +92,23 @@ For `auto-value-annotations`, you can write this in `pom.xml`: </dependencies> ``` +Some AutoValue annotations have CLASS retention. This is mostly of use for +compile-time tools, such as AutoValue itself. If you are creating +a library, the end user rarely needs to know the original AutoValue annotations. +In that case, you can set the scope to `provided`, so that the user of your +library does not have `auto-value-annotations` as a transitive dependency. + +```xml +<dependencies> + <dependency> + <groupId>com.google.auto.value</groupId> + <artifactId>auto-value-annotations</artifactId> + <version>${auto-value.version}</version> + <scope>provided</scope> + </dependency> +</dependencies> +``` + For `auto-value` (the annotation processor), you can write this: ```xml |