A New Default Project Structure for Kotlin Multiplatform | The Kotlin Blog
Blog post from JetBrains
Kotlin Multiplatform is introducing a new default project structure to enhance clarity, align with conventions from other build systems, and accommodate changes in Android Gradle Plugin 9.0. The updated structure separates shared code into a distinct Kotlin Multiplatform library module and designates specific application modules for each platform, such as androidApp, desktopApp, and webApp, to streamline configuration and responsibilities. This change addresses previous issues where the composeApp module handled multiple responsibilities and included complex configurations. The new structure also adapts to different configurations, such as projects with native UI or server-side components, by adding sharedLogic and sharedUI modules as needed. While existing projects are not required to adopt this structure, updates are necessary for Android projects due to AGP 9.0 requirements. Tools and resources are available to guide developers through this transition, ensuring ease of modularization and consistency across different configurations.