From 464adc914306ce32c5a5c89cd537009806c6ec34 Mon Sep 17 00:00:00 2001 From: Filip Hrisafov Date: Sat, 29 Jan 2022 09:24:56 +0100 Subject: [PATCH] #2682 Change RetentionPolicy of `@DecoratedWith` to `CLASS` In some circumstances (used with other types of aggregating processors, e.g. Spring) the Gradle incremental compilation works correctly only for classes annotated with the `CLASS` or `RUNTIME` retention policy. The `@DecoratedWith` is the only annotation from MapStruct that was `SOURCE` retention. With this commit we are changing its retention policy in order for better compatibility with the Gradle Incremental compilation --- core/src/main/java/org/mapstruct/DecoratedWith.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/main/java/org/mapstruct/DecoratedWith.java b/core/src/main/java/org/mapstruct/DecoratedWith.java index 78b2c580f..8a644f4b2 100644 --- a/core/src/main/java/org/mapstruct/DecoratedWith.java +++ b/core/src/main/java/org/mapstruct/DecoratedWith.java @@ -145,7 +145,7 @@ import java.lang.annotation.Target; * @author Gunnar Morling */ @Target(ElementType.TYPE) -@Retention(RetentionPolicy.SOURCE) +@Retention(RetentionPolicy.CLASS) public @interface DecoratedWith { /**