m

    marzelwidmer

    1 year ago
    Hello I was just trining the following tutorial … https://kotlinlang.org/docs/multiplatform-library.html#create-a-project I was searching for a setup to create Shared Lib for
    ios
    and
    android
    and also
    jvm
    is there maybe a nice other tutorial to follow along 😞 this one I stumble with the Platform specific stuff.. I was trining to put the
    Platforms
    specific code from the
    KMM Templated Sample
    `
    import platform.UIKit.UIDevice
    resp.
    actual val platform: String = "Android ${android.os.Build.VERSION.SDK_INT}"
    I am not really the
    gradle guru
    😉
    Big Chungus

    Big Chungus

    1 year ago
    Commonizer (a tool that brings shared platform APIs to intermediate sourceSets) only works for native target groups. Your only option (for your set of targets) is to use commonMain with expect/actual.
    You can also have a look at my template github.com/mpetuska/template-kmp-library
    m

    marzelwidmer

    1 year ago
    thanks I will take a look… 🙂
    @Big Chungus is quiet new your template .. you have created already a lib with it 🙂 where I also can take a look….
    Big Chungus

    Big Chungus

    1 year ago
    The template comes with some sample classes and rests outlining the usage
    Also sandbox module is a consumer playground
    But the idea us that you get setup for ALL the platforms and then just remove what you don't need
    Although it is missing android setup since i have no experience in that. But for simple cases, you can publish an android lib as a jar (instead of aar)