From 87726ff7be5b17d9f81011a84c4e9e1132108203 Mon Sep 17 00:00:00 2001 From: weisj <31143295+weisJ@users.noreply.github.com> Date: Tue, 17 Aug 2021 12:09:33 +0200 Subject: [PATCH] Annotations: Annotate generated classes as @Generated --- .../darklaf/annotations/processor/SynthesiseLafProcessor.java | 1 + annotations/build.gradle.kts | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/annotations-processor/src/main/java/com/github/weisj/darklaf/annotations/processor/SynthesiseLafProcessor.java b/annotations-processor/src/main/java/com/github/weisj/darklaf/annotations/processor/SynthesiseLafProcessor.java index 8c27d855..cb4db529 100644 --- a/annotations-processor/src/main/java/com/github/weisj/darklaf/annotations/processor/SynthesiseLafProcessor.java +++ b/annotations-processor/src/main/java/com/github/weisj/darklaf/annotations/processor/SynthesiseLafProcessor.java @@ -64,6 +64,7 @@ public class SynthesiseLafProcessor extends AbstractProcessor { builder.append(" * @deprecated Auto-Generated class. Use LafManager.installTheme(Theme) instead.\n"); builder.append(" */\n"); builder.append("@Deprecated\n"); + builder.append("@javax.annotation.Generated(value = {\"").append(getClass().getName()).append("\"})\n"); builder.append("public class ").append(synthesisedClassName).append(" extends ").append(baseClassName); builder.append(" {\n\n"); builder.append(IDENT).append("public ").append(synthesisedClassName).append("() {\n"); diff --git a/annotations/build.gradle.kts b/annotations/build.gradle.kts index 3124513a..369a64c2 100644 --- a/annotations/build.gradle.kts +++ b/annotations/build.gradle.kts @@ -2,3 +2,7 @@ plugins { `java-library` `module-info-compile` } + +dependencies { + api(libs.javaxAnnotations) +}