Hello, I have a ksp module and I want to use a pro...
# ksp
f
Hello, I have a ksp module and I want to use a processor to generate methods used by kotlin/js module. The main struggle is that I want the generated methods to use a javascript specific method (specifically the js function which runs js code). This is similar to the JSPlainObject compiler plugin. Is this possible? If so how?
r
Hi, I think you can, but needs to explicit constraint the JS target platform to generate and compile successfully, so you need to explain your processor only can runs on
kspJs.
In your processor needs to verify the environment what kind of platform the processor are analyzing with Environment.platforms Theoretically, that is how it would be done, but I have not tried it, and you would have to allow the processor to be available in comminMain or not, depending on your objective.