https://kotlinlang.org logo
#multiplatform
Title
# multiplatform
l

Lukasz Kalnik

03/28/2024, 11:43 AM
Why does the Kotlin Multiplatform Project Wizard, when I create an Android/iOS project without Compose Multiplatform, put a
commonMain
sourceSet in the
composeApp
module (which essentially only holds the Android app), although there is also a
shared
KMP module created? Also, why is the KMP plugin applied to this
composeApp
project? Can I safely remove both the
commonMain
sourceSet and the KMP plugin from
composeApp
? Do I have to then change the name of the
androidMain
sourceSet to simply
main
?
j

Jacob Ras

03/28/2024, 11:46 AM
Not sure why it creates it when Compose Multiplatform is not checked, but yes, you can do the changes you suggest if you only depend on
[shared]
outputting multiplatform code.
l

Lukasz Kalnik

03/28/2024, 11:46 AM
Thank you for the quick and helpful answer!
j

Jacob Ras

03/28/2024, 11:47 AM
You could also rename
composeApp
to
androidApp
then, if you want to make it very clear it's just that 🙂
👍 1
l

Lukasz Kalnik

03/28/2024, 11:48 AM
I suspect it has just one template for the modules and runs it more or less for all types of projects. Probably there are no detailed customizations for all the permutations Android/iOS/desktop/Web Compose Multiplatform/no Compose Multiplatform etc.