I created a new compose desktop project (for Andro...
# compose-desktop
p
I created a new compose desktop project (for Android and Desktop) using the official web wizard, and something has chaned since 6 months ago I did my last project. Now there is a desktopDev folder. What is used for? can't find anything on google. Also, is there any updated desktop official documentation or tutorial? 6 months ago was hard to find the steps to build a desktop app. Now I'm trying to do an Android/Desktop app, and any updated tutorial will be very interesting. Almost every tutorial or documentation I'm finding is oriented to Android/iOS app, not Android/Desktop. For example, I don't see a androidMain folder, so where I must place the Android code? commonMain should be just for shared code between Android and Desktop, not for Android. If I place the Android code in commonMain, then, the expect/actual structure will not work, because it depends on placing the expect empty on commonMain.
c
p
it seems that the issue was the project must be openned in "project" view and not in "android view", now I can see "androidMain" and "desktopDev" is not visible
on the other hand, something is still not clear, because when you download an official sample, like for example imageviewer, you can see the project structured with androidApp, desktopApp and shared
if you generate it with the web wizard, you only have "composeApp"
androidApp, desktopApp and shared are missing
c
yes, its just another approach to strucuture the gradle project. the wizard “exposes” one compose app with multiple targets.
imageviewer
is 2 apps (one android and one desktop) that share code using the
shared
project.
p
mmmm, maybe the first one is being replaced with the second? recents announcements and all the samples using the second approach seems to point to that direction
c
It’s all up to you, there is no „replaced“. Both have pros and cons and bothbhave their use-case.
p
I can't see different use cases where they have more or less pros/cons
as far as I know both have exactly the same purpose and do exactly the same (generating apps for different platforms), but using a different project structure etc...
when developing an app for android and desktop, when whould you prefeer option 1 (one module) above option 2 (various modules and shared module)?
also, if they have migrated their samples to shared module, maybe they are in fact replacing the previous way, but then I don't see why the wizard still uses the previous one. Even the samples they link from external repos are using the shared module for common source code