Join Slack
I want to use optics for a multiplatform project, but KSP seems a bit tricky to setup. Does anyone h...
# arrow
e
Emil Kantis
07/03/2024, 9:31 PM
I want to use optics for a multiplatform project, but KSP seems a bit tricky to setup. Does anyone have some example of getting it all to work?
s
simon.vergauwen
07/04/2024, 8:38 AM
KSP KMP is annoying.. Are all the models defined in
commonMain
? If yes, then it's okay-ish. Let me look for an example, we have it somewhere.
simon.vergauwen
07/04/2024, 8:39 AM
https://github.com/arrow-kt/Arrow-KMP-Template/blob/44c909cdb6dcc9603666cd42995ae9e96bbd45ad/build.gradle.kts#L20
simon.vergauwen
07/04/2024, 8:39 AM
And you also have to manually link the generated code to
commonMain
,
https://github.com/arrow-kt/Arrow-KMP-Template/blob/44c909cdb6dcc9603666cd42995ae9e96bbd45ad/build.gradle.kts#L53
simon.vergauwen
07/04/2024, 8:40 AM
Template is a bit outdated, but afaik this KSP setup should still work.
e
Emil Kantis
07/04/2024, 8:44 AM
Thx Simon, I'll have a look 🙏 Models are in commonMain indeed 🙂
5
Views
Open in Slack
Previous
Next
kotlinlang
A modern programming language that makes developers happier.
Powered by