Hi folks! Quick question from the Kotlin team to f...
# multiplatform
a
Hi folks! Quick question from the Kotlin team to folks who have created their Multiplatform projects from the existing Android app. Did you manage to transfer all the configuration you had for build types and/or build flavors in your Android project to your Multiplatform project? Please vote 👌*/*🚫 p.s. If you voted 🚫, could you please share (in the thread or just DM me) what configuration you had to get rid of?
👌 8
🚫 3
p
I stop using flavors and variants in Android long time ago. The solution doesn't scale well when the amount of variants/flavors is significantly big. Good for max 3. I move instead to a plugin oriented architecture where I can provide at build time a specific plugin implementation for a specific build. Now, I am able to do that in Android because reflection is really good and battle tested but I haven't even tried in kmp. Not sure how well supported is reflection in the other platforms.
j
For me it's a 👌. I added web/JS to my Android project. I spent a lot of time looking for something like debug & release types in the web project. Eventually settled on writing a Gradle task that reads a build parameter and writes some constants to a file. This was before I discovered the
BuildKonfig
library 😬 But the Android configuration I had.. it's still there. I only made my domain modules multiplatform.