Anyone with a large monorepo setup interested in d...
# multiplatform
j
Anyone with a large monorepo setup interested in discussing dev/CI build configuration strategies for consuming KMP shared libraries? Specifically one or more KMP shared libraries plus Android & iOS apps in the one repo. On the Android side this is straightforward because our Android apps are able to pull in the KMP shared lib modules with relative paths using Gradle.. but on the iOS side it becomes more complex. We briefly considered KMMBridge, but we do not pre-build & deploy our internal shared libraries, we use the current git head as the source of truth and rely on Gradle’s (very good) build caching to keep our build times fast. The obvious solution seems to be Xcode build phases that call
embedAndSignAppleFrameworkForXcode
Gradle tasks for the required KMP shared lib(s) as mentioned in these docs, but I’d love to hear from anyone who has done this with large teams and/or at scale and hear any advice you may have or gotchas to look out for
👀 1
j
Yes I would love to discuss that issue. We are fairly large team (20 devs) using monorepo. We are having huge problems with our CI because we use self hosted Gitlab + own HW gitlab runners. The fact that we have monorepo means that we have to run test for KMM+Android+iOS on every push to merge request. It takes 12 minutes to build and link XCFramework for iOS so the iOS tests take 20+ minutes + Android tests. The fact that we need to run iOS means we have to use Mac OS runners which are fairly expensive so we have only 5 of them. To increase bandwidth of our CI system we are using parallel job execution for every runner. The problem is that with parallel jobs the flakiness increased a lot. Its hard to fix/debug this system as there is lot of abstraction and the logs aren’t very helpful. I want to optimise this system as much as I can and would LOVE to collaborate/brainstorm with somebody who has the same problem 🙂