https://kotlinlang.org logo
#getting-started
Title
# getting-started
s

Siddhartha Juluru

08/23/2022, 10:10 PM
Anyone know if its possible to write a custom AnnotationProcessor for an application that isn't an Android app? All the tutorials I've seen online using Android and Google's AutoService but i'm using Spring Boot.
👌 1
e

ephemient

08/23/2022, 10:19 PM
you write an annotation processor (either APT or KSP) in the same way, regardless of whether it's meant to run on an Android project or not
all AutoService does is save you from having to write
resources/META-INF/services/javax.annotation.processing.Processor
yourself, it is unrelated to Android
and making use of an annotation processor is the same for both Android and non-Android projects, just by adding the plugin and a
kapt
or
ksp
dependency
2 Views