Hello everyone, I am working on a mustache parser ...
# ksp
l
Hello everyone, I am working on a mustache parser & render for kotlin multiplatform https://github.com/L-Briand/KTM In it, there is a ksp plugin to create automatic adapter for a given class:
Copy code
@KtmContext data class User(val name: String)
This will automatically creates a
UserKtmAdapter
on the same package. The current implementation creates a
AutoKtmAdaptersModule
with all generated adapters inside. Then, the user can set this module as default. However, if there is two configuration for the same target, likely
Jvm
and
JvmTest
, the file
AutoKtmAdaptersModule
is generated for both, and the upper most configuration takes precedence. In this case the one generated in
JvmTest
will replace the one in
Jvm
. Do you know of a way to combine them ?
j
It sounds to me that
AutoKtmAdaptersModule
should only be generated for one configuration or at least you should generated them in different name spaces so there is no duplicate declaration otherwise it should be a compilation error?
l
@Jiaxiang Thanks for the reply. Having a way to differentiate between configurations should be right.
Copy code
jvmMain -> package.a.AutoKtmAdaptersModule
jvmTest -> package.b.AutoKtmAdaptersModule
Should I find a way to pass ksp arguments based on configuration ? Do you know of any ?