kmp-module-split-for-packaging
Installation
SKILL.md
One shared library, thin launchers
Three modules, and each has exactly one job:
| Module | Plugins applied | Owns |
|---|---|---|
<shared-ui> |
Kotlin Multiplatform + the Android multiplatform library plugin + Compose | all UI, view models, expect/actual, shared resources |
<android-launcher> |
the Android application plugin, plus whatever its own sources and packaging need | manifest, launcher icons, application class, shrinker rules, ABI splits, store config |
<desktop-launcher> |
Kotlin Multiplatform with a single jvm() target + Compose desktop + the packaging plugin |
main(), packaging targets, installer metadata, shrinker wiring |
Plugin lists overlap, and that is expected. All three modules here apply the Compose compiler; the shared module and the desktop launcher both apply Kotlin Multiplatform and Compose Multiplatform. A launcher applies whatever its own sources and packaging block need. What the split makes exclusive is ownership — app identity and packaging versus shared code — not which plugin ids may appear where; dropping one from a launcher breaks that launcher's own sources.
Both launchers depend on the library and add nothing to it: