-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Plugin-based architecture? #2
Comments
Thanks! That was my first intention, but not sure how to setup a plugin-based architecture with KSP, but it could be interesting. If you know another project using this architecture with KMP I'm interested. For the enum case, I don't think there is a lot of way to encode it: String, Int, or fully wrapped may be enough. I was thinking at an ExportMode in the annotation, something like that: #5 And it'll warn if there is a public method or field exposed as it cannot be exported in those modes for example. Is it matching your needs? |
This comment has been minimized.
This comment has been minimized.
I tried many solutions but all were very limited, and eventually just a subset of what KSP offers. I think that KSP already provides a "plugin-based architecture" in the sense that you could write your own KSP processor with your custom annotation, and use this annotation on the enums you want to generate differently for example. Given you respect the contract (2 methods import/export + expected package name) then it'll work with the other classes KustomExport is currently generating. So I'm closing this ticket for now. Indeed, do not hesitate to re-open if you have a more specific need/approach on this topic. |
This project is super cool!
I'm curious if you'd explore a plugin-based architecture.
As an example, we have enums declared like:
We'd love to write a custom rule that lets us export
MyEnum
as the underlyingvalue
(as a lightweightString
), rather than a heavierclass
.We also have other enum classes that use
Int
s.The text was updated successfully, but these errors were encountered: