Hi đź‘‹
I have an multi module android app and looking for ways to share many of those modules to iOS through SPM
Does KMMBridge support a publishing multiple SPM packages from the same monorepo?
r
russhwolf
12/21/2022, 4:53 PM
At the moment, not really. It's only configured to publish a single library via a package file at the repo root. We're interested in improving support here, though. So I better understand your use-case, do you have an existing setup where you publish multiple SPM packages?
c
Carlos Monzon
12/21/2022, 10:05 PM
Hi @russhwolf
Thanks for the confirmation. I don’t have an existing setup yet. I have multiple kotlin modules under the android repository that I would like to publish as seperate SPM (ie analytics module, data layer, etc)
r
russhwolf
12/22/2022, 1:56 PM
Ok. Other question: do you actually need multiple SPM frameworks, or are you just modularizing your Kotlin code? It's pretty common to wrap all your Kotlin/Native modules into a single framework and just publish that, because otherwise your individual modules can't talk to each other very easily.
s
shahroz
12/25/2022, 7:37 PM
@russhwolf the biggest usecase I have come across for this is native SDK/library development.
So we have native Android and iOS SDKs, they are multi modules, we are moving the common code in KMM so we don't have to rewrite it.
If the KMM modules would be multi module, then
Each native sub module, can have it's corresponding KMM submodule rather than one KMM module with everything and hence bloating it.
c
Carlos Monzon
12/28/2022, 9:35 AM
@russhwolf ideally I will need it separately as I have a multi module setup on iOS too and not all the features modules require the same dependencies. Also we have appclips that only require less dependencies. Having a single framework might get challenging once we start sharing more code.
But interested in having a single framework from all kotlin/native modules as a first iteration. Can I have that approach using KMMBridge?
s
SrSouza
01/02/2023, 1:05 PM
I'm looking for that approach as well @russhwolf, do you have any public example to how to share multiple kotlin modules in a single package?
My first idea was to create a Gradle Kotlin Module only for iOS build, importing all Kotlin Modules that supports iOS and using KMMBridge on it only.