Is it possible to split the multiplatform code, to...
# multiplatform
a
Is it possible to split the multiplatform code, to have multiple modules?
c
Yes, using Gradle sub-projects. Here's an example: https://gitlab.com/arcachon-ville/formulaide
(example: module
client
(JS+JVM) depends on module
api
(JS+JVM);
ui
(JS) depends on
client
,
database
(JVM) depends on
api
)
You can just find any tutorial on “multi project Gradle builds” and do exactly that, the Gradle multiplatform module takes care of everything else
👍 1
a
Thank you
Do you have an example for Android/iOS? I know that multiple modules can be achieved the same through Gradle, but would be nice to see an example specifically for ios
c
I have never used Kotlin for iOS myself yet. However it should pretty much be the normal config you'd see in any normal iOS module (any normal Gradle demo should do) + the glue to make it into a multi-module build (but these are separate so none should impact the other) If you try and have any specific issues, don't hesitate to ask
m
Yes of course You can check my project
Copy code
android---\
web---------client-----\
ios-------/             \
desktop--/               -- common
            backend----/
https://github.com/CurrencyConverterCalculator/CCC
👍 1