Hi guys, I have one doubt regarding the Kotlin Mul...
# multiplatform
r
Hi guys, I have one doubt regarding the Kotlin Multiplatform framework, I want to create a library that can be used on most platforms, mainly targeting: • js (node, to be used with react-native or a front-end framework) • Android • iOS Is Kotlin Multiplatform a viable option to it? What would be the artifacts generated for each of those options and does anyone have an example? (edited)
e
hi Rodrigo... KMM is indeed an option. This is the sample that jetbrains keeps up to date. Just build it and you'll see the artefacts. https://github.com/Kotlin/kmm-production-sample
r
Hi @Eamon Keane thank you so much for the fast reply, do they also have an example for a Library instead of an Application?
g
You can at least generate a jar, a npm archive and a xcframework from a KMP project. (Even multiple archives if you use multiple modules.)
☝️ 1
r
Perfect, I'll start a sample project and see where it leads me hahaha Thank you!
a
You can produce
.aar
for Android and
.framework
for iOS. Not sure about js thogh
h
@Rodrigo Bressan De Souza there’s a tutorial for libraries as well: https://kotlinlang.org/docs/multiplatform-library.html