From: fredboy Date: Tue, 14 May 2024 17:34:09 +0000 (+0700) Subject: Add Generated annotation to generated code X-Git-Url: http://deadsoftware.ru/gitweb?a=commitdiff_plain;h=4f3174f9178f0f5c0891bdd9f6ecd8738f0274bf;p=cavedroid.git Add Generated annotation to generated code --- diff --git a/dagger-multibind-ksp/src/main/kotlin/ru/fredboy/cavedroid/ksp/processor/GenerateMapMultibindingsSymbolProcessor.kt b/dagger-multibind-ksp/src/main/kotlin/ru/fredboy/cavedroid/ksp/processor/GenerateMapMultibindingsSymbolProcessor.kt index cfaa3a5..860653f 100644 --- a/dagger-multibind-ksp/src/main/kotlin/ru/fredboy/cavedroid/ksp/processor/GenerateMapMultibindingsSymbolProcessor.kt +++ b/dagger-multibind-ksp/src/main/kotlin/ru/fredboy/cavedroid/ksp/processor/GenerateMapMultibindingsSymbolProcessor.kt @@ -52,6 +52,11 @@ class GenerateMapMultibindingsSymbolProcessor( val moduleObject = TypeSpec.objectBuilder(moduleName) .addAnnotation(ClassName("dagger", "Module")) + .addAnnotation( + AnnotationSpec.builder(ClassName("javax.annotation.processing", "Generated")) + .addMember("value = [%S]", this::class.qualifiedName!!) + .build() + ) .addFunctions(bindings) .build() diff --git a/dagger-multibind-ksp/src/main/kotlin/ru/fredboy/cavedroid/ksp/processor/GenerateSetMultibindingsSymbolProcessor.kt b/dagger-multibind-ksp/src/main/kotlin/ru/fredboy/cavedroid/ksp/processor/GenerateSetMultibindingsSymbolProcessor.kt index 18cd3c9..6bcb60c 100644 --- a/dagger-multibind-ksp/src/main/kotlin/ru/fredboy/cavedroid/ksp/processor/GenerateSetMultibindingsSymbolProcessor.kt +++ b/dagger-multibind-ksp/src/main/kotlin/ru/fredboy/cavedroid/ksp/processor/GenerateSetMultibindingsSymbolProcessor.kt @@ -35,6 +35,11 @@ class GenerateSetMultibindingsSymbolProcessor( val moduleObject = TypeSpec.objectBuilder(moduleName) .addAnnotation(ClassName("dagger", "Module")) + .addAnnotation( + AnnotationSpec.builder(ClassName("javax.annotation.processing", "Generated")) + .addMember("value = [%S]", this::class.qualifiedName!!) + .build() + ) .addFunctions(bindings) .build()