Skip to content

Commit

Permalink
Make processor incremental (aggregating)
Browse files Browse the repository at this point in the history
  • Loading branch information
houlisha committed Mar 7, 2020
1 parent 5de3946 commit d6002f8
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
21 changes: 21 additions & 0 deletions processor/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,13 @@
<artifactId>android</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>net.ltgt.gradle.incap</groupId>
<artifactId>incap</artifactId>
<version>0.2</version>
<scope>provided</scope>
<optional>true</optional>
</dependency>
</dependencies>


Expand Down Expand Up @@ -140,6 +147,20 @@
</executions>
</plugin>

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<annotationProcessorPaths>
<path>
<groupId>net.ltgt.gradle.incap</groupId>
<artifactId>incap-processor</artifactId>
<version>${incap.version}</version>
</path>
</annotationProcessorPaths>
</configuration>
</plugin>

</plugins>
</build>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
import com.hannesdorfmann.fragmentargs.bundler.ArgsBundler;
import com.hannesdorfmann.fragmentargs.repacked.com.squareup.javawriter.JavaWriter;

import net.ltgt.gradle.incap.IncrementalAnnotationProcessor;
import net.ltgt.gradle.incap.IncrementalAnnotationProcessorType;

import java.io.IOException;
import java.io.Serializable;
import java.io.Writer;
Expand Down Expand Up @@ -41,8 +44,10 @@
/**
* This is the annotation processor for FragmentArgs
*
* Is an aggregating processor, because we add more than one originating element for each builder file.
* @author Hannes Dorfmann
*/
@IncrementalAnnotationProcessor(IncrementalAnnotationProcessorType.AGGREGATING)
public class ArgProcessor extends AbstractProcessor {

private static final String CUSTOM_BUNDLER_BUNDLE_KEY =
Expand Down

0 comments on commit d6002f8

Please sign in to comment.