From 0b58d0428800f186e8430a9f51673c2fa5383744 Mon Sep 17 00:00:00 2001 From: ronshapiro Date: Fri, 17 May 2019 12:51:20 -0700 Subject: [PATCH] Make AutoFactory an isolating annotation processor in Gradle RELNOTES=Gradle: `@AutoFactory` is now an isolating annotation processor ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=248771150 --- factory/pom.xml | 6 ++++++ .../google/auto/factory/processor/AutoFactoryProcessor.java | 3 +++ 2 files changed, 9 insertions(+) diff --git a/factory/pom.xml b/factory/pom.xml index faf9bb1126..9ffc8ac308 100644 --- a/factory/pom.xml +++ b/factory/pom.xml @@ -82,6 +82,12 @@ 1.0-rc4 provided + + net.ltgt.gradle.incap + incap + 0.2 + provided + com.google.googlejavaformat google-java-format diff --git a/factory/src/main/java/com/google/auto/factory/processor/AutoFactoryProcessor.java b/factory/src/main/java/com/google/auto/factory/processor/AutoFactoryProcessor.java index 38ef55fa7b..7c84249188 100644 --- a/factory/src/main/java/com/google/auto/factory/processor/AutoFactoryProcessor.java +++ b/factory/src/main/java/com/google/auto/factory/processor/AutoFactoryProcessor.java @@ -51,12 +51,15 @@ import javax.lang.model.util.Elements; import javax.lang.model.util.Types; import javax.tools.Diagnostic.Kind; +import net.ltgt.gradle.incap.IncrementalAnnotationProcessor; +import net.ltgt.gradle.incap.IncrementalAnnotationProcessorType; /** * The annotation processor that generates factories for {@link AutoFactory} annotations. * * @author Gregory Kick */ +@IncrementalAnnotationProcessor(IncrementalAnnotationProcessorType.ISOLATING) @AutoService(Processor.class) public final class AutoFactoryProcessor extends AbstractProcessor { private FactoryDescriptorGenerator factoryDescriptorGenerator;