Thread
#multiplatform
    Rodrigo Bressan De Souza

    Rodrigo Bressan De Souza

    8 months ago
    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)
    Eamon Keane

    Eamon Keane

    8 months ago
    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
    Rodrigo Bressan De Souza

    Rodrigo Bressan De Souza

    8 months ago
    Hi @Eamon Keane thank you so much for the fast reply, do they also have an example for a Library instead of an Application?
    Grégory Lureau

    Grégory Lureau

    8 months ago
    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.)
    Rodrigo Bressan De Souza

    Rodrigo Bressan De Souza

    8 months ago
    Perfect, I'll start a sample project and see where it leads me hahaha Thank you!
    Anton Afanasev

    Anton Afanasev

    8 months ago
    You can produce
    .aar
    for Android and
    .framework
    for iOS. Not sure about js thogh
    h

    Hadji Musaev

    8 months ago
    @Rodrigo Bressan De Souza there’s a tutorial for libraries as well: https://kotlinlang.org/docs/multiplatform-library.html