Thread
#multiplatform
    dambakk

    dambakk

    1 year ago
    @kpgalligan, I noticed the comment in the KaMPKit project saying
    // Revert to just ios() when gradle plugin can properly resolve it
    for adding the ios source set. Applying your “workaround” fixed my unresolved reference issues in iosMain. Do you know when the plugin will be fixed, or a ticket for the plugin I can follow the progress?
    s

    streetsofboston

    1 year ago
    I had trouble using the
    ios()
    config call in the official KMM Plugin as well. Compilation/building works fine when it is callrd, but it causes red-lines (errors) in the IDE.
    kpgalligan

    kpgalligan

    1 year ago
    I should have a ticket but I don’t 🙂
    The hierarchical project structure flag that’s been introduced recently might “fix” this, but I haven’t had much time to play with it.
    The situation becomes much more complex when using the hierarchical flag in libraries, and I’ve been knee deep in that lately.
    s

    streetsofboston

    1 year ago
    @kpgalligan Those flags are a mixed bag. See this thread:https://kotlinlang.slack.com/archives/C3PQML5NU/p1601390105095900
    russhwolf

    russhwolf

    1 year ago
    Echoing Kevin, and embarrassing spoiler alert for my Android Summit talk today, I've been having trouble getting consistent behavior out of those flags when consuming a library. Doesn't help that there's a bit of a combinatorial explosion when you try to mix and match different options between library and consumer.
    kpgalligan

    kpgalligan

    1 year ago
    I tried to use the hierarchical with a library build and it fell over trying to compile metadata build for ios as well as common. Long story, and still don’t know what was happening, but I removed it and things worked. If I can isolate a case I’ll send a ticket, but had to move on.
    russhwolf

    russhwolf

    1 year ago
    The general idea as I understand it is those flags create additional metadata artifacts for intermediate source-sets, and that helps the IDE know what it can see there. On native that includes figuring out the intersection of platform APIs available to that source. That should theoretically help the
    ios()
    builder since it creates a shared ios source between x64 and arm64. There's also a compatibility flag for libraries so they don't break consumers who don't have any of the flags.
    But I haven't been able to isolate their behavior enough to understand what's going on beyond what I read in docs and slack comments