https://kotlinlang.org logo
#multiplatform
Title
# multiplatform
d

dambakk

10/08/2020, 8:47 AM
@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?
👍 1
s

streetsofboston

10/08/2020, 11:59 AM
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.
1
k

kpgalligan

10/08/2020, 1:46 PM
I should have a ticket but I don’t 🙂
🙂 1
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

10/08/2020, 2:19 PM
@kpgalligan Those flags are a mixed bag. See this thread: https://kotlinlang.slack.com/archives/C3PQML5NU/p1601390105095900
r

russhwolf

10/08/2020, 2:24 PM
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.
k

kpgalligan

10/08/2020, 2:25 PM
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.
r

russhwolf

10/08/2020, 2:34 PM
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