I want to to use ksp to generate some graalvm reflect config files. How can I do that? I found the following post: How to generate android resource (xml) files by using Kotlin KSP
This describes a hacky gradle workaround to include a resource file in a configured dir and merge it with the main source sets resource dir. This is not the mechanism I would wanna use as a user of a lib, as it ties me pretty much to gradle and its clumsy.
When using createNewFile
on the code generator, the file always ends up in the source code inside of the jar and not in the META-INF dir.
Is there a better way of using ksp natively somehow for creating a resource? Thanks.
I found out how to do it:
This will create the json file at the specified resource folder location