Skip to content

Commit

Permalink
Update Maven usage in README to suggest annotationProcessorPaths
Browse files Browse the repository at this point in the history
Also defer to the README instructions for all build tools (rather than
just Gradle)

Fixes #293
Fixes #719

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=154857182
  • Loading branch information
tbroyer authored and ronshapiro committed May 2, 2017
1 parent 769747a commit 24a47a7
Showing 1 changed file with 32 additions and 1 deletion.
33 changes: 32 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,37 @@ of your `pom.xml` and the `dagger-compiler` artifact as either an `optional` or
</dependencies>
```

or as an `annotationProcessorPaths` value of the `maven-compiler-plugin`
(requires at least version 3.5):

```xml
<dependencies>
<dependency>
<groupId>com.google.dagger</groupId>
<artifactId>dagger</artifactId>
<version>2.x</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.6.1</version>
<configuration>
<annotationProcessorPaths>
<path>
<groupId>com.google.dagger</groupId>
<artifactId>dagger-compiler</artifactId>
<version>2.x</version>
</path>
</annotationProcessorPaths>
</configuration>
</plugin>
</plugins>
</build>
```

If you use the beta `dagger-producers` extension (which supplies
parallelizable execution graphs), then add this to your maven configuration:

Expand All @@ -80,7 +111,7 @@ parallelizable execution graphs), then add this to your maven configuration:
```groovy
// Add plugin https://plugins.gradle.org/plugin/net.ltgt.apt
plugins {
id "net.ltgt.apt" version "0.5"
id "net.ltgt.apt" version "0.10"
}
// Add Dagger dependencies
Expand Down

0 comments on commit 24a47a7

Please sign in to comment.