Hey All Is there any official guide regarding whit...
# multiplatform
a
Hey All Is there any official guide regarding white-labelling a KMP project using Compose Multi Platform? I want to be able to have different tenent with different UI structure (not just theme), flexible customization
🚫 1
e
Nothing official, as far as I'm aware, but you could probably find some open source projects. Since build variants don't exist on KMP, I have a separate module for each client, and I select which one to add in gradle:
Copy code
when (buildFlavor) {
                BuildFlavor.One -> implementation(projects.config.one)
                BuildFlavor.Two -> implementation(projects.config.two)
            }
Where buildFlavor is defined in gradle.properties. There's also https://github.com/yshrsmz/BuildKonfig if you want to pass some values from gradle into your source code, depending on the flavor.
a
thank you @Ernestas, i'll research further and update here
Its a hot topic, i thought something would have been there, there are two relevant articles on the medium but they are not very detailed, one of them focues on native UI per platform (not CMP), other is very brief ios focussed
@zsmb is there anything related in pipeline?
b
I built a flavor system for Ansa, been thinking about making a plugin for it actually. I'll ping back here sometime next week if I'm able to
z
No current plans to build an official solution for this, but you can vote for it on this issue. There is indeed the BuildConfig library linked above as well as https://github.com/gmazzo/gradle-buildconfig-plugin available for this task.
👍 1
a
thank you @brandonmcansh @zsmb, i’ve up voted it, will give the shared plugin a try
@zsmb this plugin only generates types constants (such as urls, flags, ids etc), but it doesn't provide true flavour-style source sets for the shared KMP code