Thread
#multiplatform
    Aditya Kurkure

    Aditya Kurkure

    2 months ago
    When compiling a multiplatform library for android what happens under the hood? Does the compiler compile
    commonMain
    and
    AndroidMain
    the same way any normal multi module android library written in kotlin is compiled or are there any other changes that the multiplatform plugin adds?
    Ayush Bansal

    Ayush Bansal

    2 months ago
    looping on this , want to know more about multiplatform plugin
    Landry Norris

    Landry Norris

    2 months ago
    I haven’t noticed any changes, and I’ve been using the same description you gave when describing how it works to others, but other than the obvious expect/actual mechanism, I think the description is accurate.
    Aditya Kurkure

    Aditya Kurkure

    2 months ago
    Even for the expect actual mechanism what would the file in commonMain be treated just like an interface? Because if it isn't then the compiler may be combining the
    commonMain
    and
    androidMain
    at into one. 😕
    Landry Norris

    Landry Norris

    2 months ago
    I looked at the compiler source code once, but didn't study it too well. It looks like it does a Validation check on the expect/actuals to make sure they match, then does another pass where it essentially inlines the actual declaration. I'm not 100% sure this is exactly how it works, but that's what I could tell.