question about linking: I have a little (multiplat...
# kotlin-native
l
question about linking: I have a little (multiplatform) project that builds an iOS framework. That framework has all the kotlin-native stuff linked in (ie the stdlib). I was hoping to make this a multi-module project and build lots of little frameworks. If I do will they all necessarily get their own copy of the stdlib? Is that avoidable in any reasonable way?
r
You can only have one Kotlin framework in a project. You should have your modules publish klibs, and then your top-level module can import them and build a framework
l
hm… that’s interesting, but ultimately I want to have many iOS apps (which are not multiplatform, and are just built with xcode tooling) consume various combinations of my libraries
i
@loganj you can build libs from small parts of your code and put them into maven. then reuse in gradle on each K/N project. Which means you cant do that atm. But you can always recompile 1 project with different set of gradle dependecies from your libs to get what you want. 1. build 10 libs 2. combine them at 1 mpp 3. build 4. combine 7 of them at same mpp 5. build etc
l
yeah, that does seem like the best available option rn
thanks 🙏
s
Regarding using multiple Kotlin frameworks: see this thread https://github.com/JetBrains/kotlin-native/issues/2423