for those of you doing an iOS / Android project - ...
# multiplatform
w
for those of you doing an iOS / Android project - what is your typical folder structure like? do you have iOS, Android, and Shared code in one git repo or separate repo’s for each?
w
We use monorepo. • `android`: The Android modules - what is only Android, like
app
, and other modules. •
ios
: The xcode iOS project. • `modules`: All the shared modules - and the umbrella modules.
h
one for faster builds (at least android)
w
Using monorepo and both platforms seeing PRs, was the incentive for an Android dev learn and contribute to iOS project, the same for 1 of the iOS devs, learning Kotlin and already contributing to the KMM side.
n
We used to have separate repositories for iOS, Android and KMM, but have since consolidated all 3 into a single repository, which we're very happy with. We did so in order to run CI on both iOS and Android, thus preventing changes in a shared module from breaking either platform. Our team members are primarily either Android or iOS developers, and rarely cross over to the other. We're all contributing to our shared KMM module.
g
One KMP library in one git repository containing several modules + legacy projects (Android, iOS, web) using the new KMP library as a replacement for old modules.
l
When using the KMM plugin, i don't see a
buildSrc
being generated, is that something you added later @wbertan? I personally like to organize it as
Copy code
android:app
android:designsystem
android:xxx
ios
shared
The iOS dev is free to reorganize whatever in the xcode workspace, for Android I prefer to separate the design system and screens and some other features in modules (to keep things tidy in the root folder per platform).
w
Oh but we have loads of modules, in both
android
(25 modules) and
modules
(27 modules) there 🙃 The
buildSrc
🤔 not sure, it is there even when at the begin was just an Android project (before KMM we started with Android first - then later migrated to KMM)
👍 1
s
Our KMM project is only one of many internal libraries we use ATM, so the project stands alone in it’s own repo. The iOS project uses SPM to include the shared iOS lib and the shared Android lib is published to our internal package registry.