From bffac145b41c24424bbce8197f5a8eee22c7e13f Mon Sep 17 00:00:00 2001 From: ludo Date: Mon, 25 Nov 2019 16:55:49 -0800 Subject: [PATCH] Rollback 28a2c791575a7e4545293169bea0921b81363a3d *** Reason for rollback *** breaks internal test *** Original change description *** Use CLASS retention for @AutoService Gradle incremental aggregating processors require all processed annotations to have CLASS retention so that the incremental compiler can substitute a class file for a source file if the file is unchanged. With SOURCE retention, Gradle requires a full rebuild. See: https://github.com/google/auto/issues/615 https://docs.gradle.org/6.0.1/userguide/java_plugin.html#aggregating_annotation_processors https://github.com/gradle/gradle/blob/v6.0.1/subprojects/langua... *** ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=282462095 --- .../src/main/java/com/google/auto/service/AutoService.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/service/annotations/src/main/java/com/google/auto/service/AutoService.java b/service/annotations/src/main/java/com/google/auto/service/AutoService.java index 260766c14b..b473d14454 100644 --- a/service/annotations/src/main/java/com/google/auto/service/AutoService.java +++ b/service/annotations/src/main/java/com/google/auto/service/AutoService.java @@ -16,7 +16,7 @@ package com.google.auto.service; import static java.lang.annotation.ElementType.TYPE; -import static java.lang.annotation.RetentionPolicy.CLASS; +import static java.lang.annotation.RetentionPolicy.SOURCE; import java.lang.annotation.Documented; import java.lang.annotation.Retention; @@ -36,7 +36,7 @@ * */ @Documented -@Retention(CLASS) +@Retention(SOURCE) @Target(TYPE) public @interface AutoService { /** Returns the interfaces implemented by this service provider. */