In all of the desktop examples, the targets seem to be split into a separate gradle module (i.e. Desktop), that just runs the application, while the core application is in a common module. Why not just run the application from the core module for these small applications? There isn’t much gained by just having
We separate multiplatform project into common/android/desktop modules because we had issues with plugin compatibility ("application" plugin doesn't compatible with "com.android.application").
But now we don't use "application" plugin, so maybe we can rewrite most of our examples with single module.
I just tried to move all sources into single module, and it worked.
11/10/2020, 2:15 PM
I agree that there isn't much to gain by creating different modules for small applications, I think it's a good practise. People often look up to official samples for best practises, so why not keeping them multi-module ?
11/10/2020, 2:20 PM
Creating small modules can be good, especially when they are in the middle layers of your application, but just having a module where you have main, apply some theming, and then delegate to common code, I’m not sure is super valuable, and I’d be interested in it’s build performance impact.