:question: Keen to hear anyone's experiences of su...
# multiplatform
d
Keen to hear anyone's experiences of supporting multiple Android 'platforms' with Kotlin Multiplatform I have a need to support iOS and Android (via KMM 👍), while I also need to have two major Android variants based on the hardware I will be deploying on... Conceptually this could be supported with multiple
android(...)
platform entries in the
multiplatform
plugin, but have heard this is unsupported or problematic at the moment. Is it recommended to use Androids own flavour/dimensions instead? Does this Android feature play nicely with
multiplatform
source folders?
v
we have multiplatform project as a module in android and in android we have 3 different flavours. For example we have GooglePlay, AppGallery and APK flavour. That works ok.
👍 1
m
Yes i go with flavours also, for the purpose of huawei and google
d
Thank you @Vojtěch Pešek and @Mustafa Ozhan for confirming this approach. If I can ask, in your setups; does this still result in a single-level of source-set folders with
multiplatform
and flavours 'working together' to contribute to the folder names e.g. something like:
Copy code
commonMain // 'MPP' folder
iosMain // 'MPP' folder
androidGoogleMain // Hybrid 'MPP + Flavour' folder
androidHuaweiMain // Hybrid 'MPP + Flavour' folder
m
I believe It should be
androidGoogle
instead of
androidGoogleMain
I do not have such folders in my project but these are the suggestions for my project
👍 1
v
We have
androidMain
in kmm, so i can’t tell. I guess it should work though, if you define it in your build.gradle