Hey gang, question about KMMBridge … I guess the r...
# touchlab-tools
b
Hey gang, question about KMMBridge … I guess the root question is: Is KMMBridge suitable for use with KMM library projects? Details about my use case: I have a KMM library project (call it ADW). it consists of several modules that make up a set of core business logic (the usual stuff, database, networking, models, repos, etc) and provides data for other applications to use. There is no ios or android app in this project. I need to use (deploy & consume) it in two ways: 1. As an “actual” Multiplatform Library … We have another KMM project (call it ADW Widgets) which exposes a set of UI components for Android and iOS (also no ios or android app in this project). Customers can use binaries from the ADW Widgets library in their own apps. That project needs to consume ADW and use it to provide the business logic and data that is displayed using the UI components. I can publish the ADW library project to github packages per the KMM docs for publishing a multiplatform library, and then consume it in my ADW Widgets project. 2. As (privately) published iOS and Android libraries … We have our own (brownfield) iOS and Android applications. They each need to consume the appropriate binary from the ADW library so they can also use the business logic and data it provides. Our own apps do not use ADW Widgets, and provide their own custom UI. So, my thinking is, use KMMBridge in the ADW project to publish binaries (aar, spm, cocoapods) along with a publish of the multiplatform library itself. The ADW widgets project can consume the multiplatform library, and our other apps can consume the published platform binaries. Also, use KMMBridge in the ADW Widgets project to publish binaries (aar, spm, cocoapods) for that library for clients to consume in their own apps.
r
KMMBridge is primarily focused on the iOS (SPM or Cocoapods) publishing side, so it might not help you with every piece of this. But if both the ADW and ADW Widgets libs have Swift consumers, then doing a separate kmmbridge publish for each of them sounds reasonable. If you're using SPM, it will go much easier if those libraries are in separate repositories so they can each have a top-level Package.swift file for their own configuration.
b
Thanks @russhwolf both libs do have swift consumers, and in particular the ADW Widgets lib will be consumed by some “third parties” outside of our organization, so we’ll probably want to publish that one via both cocoapods and spm so clients can consume in whatever way works best for them. And both libs are indeed in separate repos, so that should be ok too.