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

Kris Wong

06/26/2019, 3:45 PM
what is the specific technical limitation that prevents multiple MPP frameworks in an iOS app?
b

basher

06/26/2019, 3:46 PM
There's a runtime assertion that fires when you load the 2 frameworks about not allowing 2 K/N runtimes to run
k

Kris Wong

06/26/2019, 3:46 PM
thank you!
though I am still curious what the actual limitation is
i see the "closed world" compilation model explanation.
b

basher

06/26/2019, 3:55 PM
i think at the moment, it has more to do with the vision and less about technical limits, but now that everything is designed this way, it may take work to get out of that world, if JB is so inclined
k

Kris Wong

06/26/2019, 3:59 PM
it definitely adds a lot of overhead for organizations that want to invest in Kotlin MPP
creating and maintaining each of these "umbrella" projects for each app
b

basher

06/26/2019, 4:01 PM
we're working around it by using "export" thing here: https://kotlinlang.org/docs/reference/building-mpp-with-gradle.html
p

pardom

06/26/2019, 4:13 PM
There is overhead for sure, but I wouldn’t say a lot. I have my common code broken out into subprojects and have a buildscript in their root to combine them into a single MPP project: https://github.com/pardom/lambda-news/blob/master/common/build.gradle.kts
k

Kris Wong

06/26/2019, 4:27 PM
a buildscript is definitely helpful
my gradle fu isn't particularly strong
o

olonho

06/26/2019, 9:29 PM
Generally, we suggest modularisation on klib level and single framework at the end
k

Kris Wong

06/26/2019, 9:32 PM
will have to find the best practice for doing so
5 Views