I'm working on a custom generator to generate code from annotation on Android platform. I currently using KSP for code generating. After I generate the code, I need to generate some resource xml files, What shall I do for it?
I considered some points:
- There are official way to generate resource file in
build.gradle
, but because the content of the resource is derived from the annotation so I can't move the generator code tobuild.gradle
. - Another way is move the generator code to
build.gradle
totally, but I can't parse the annotation in source file without ksp or apt/kapt. - Where should I store the generated resource file? It seems I can't get output dir from KSP api.