Hi! I’m starting with KMP, and I’m having some problems to understand how to organize my modules.
Currently I have three Apps: Web (with the old Compose Web), Desktop and Android (sharing UI with Compose Multiplatform).
I have one common module where I have the shared Compose MP code, and I found the issue that DropdownMenu is not available in the MP code, and I need to implement it for Android and Desktop.
So I thought about using expect/actual, but then I would need to add an
actual
for web, which is not using it.
Also, as the three are using Compose, I could create expects for screen composables, and do the actual implementation in the two Compose variants. But again, I would need to repeat the code for Android and Desktop, which use the same code.
So, in my head, it would be helpful to have something like:
• One common module for web and compose KMP variants
• Another common module for Desktop and Android, to share their Compose code
That would allow me to have the expect/actual of the screens in the first module, and the expect/actual of the Dropdown in the second module.
But I’m not sure if that’s possible. And if it is, do you happen to have a sample code to check the Gradle configuration of that?
Thanks in advance!