antonioleiva
05/03/2023, 11:16 AMactual
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!Giancarlo Buenaflor
05/03/2023, 11:48 AMAnother common module for Desktop and Android, to share their Compose codeI guess you could create another
sourceSet
and let desktopMain
and androidMain
depend upon it.
something like this should work
val commonDesktopAndroidMain by creating {
dependsOn(commonMain)
desktopMain.dependsOn(this)
androidMain.dependsOn(this)
}
And then use commonDesktopAndroidMain
to define your shared codeantonioleiva
05/03/2023, 11:59 AMGiancarlo Buenaflor
05/04/2023, 1:46 PM