Sunday, June 15, 2025
HomeMobile app developmentAsserting Kotlin Multiplatform Shared Module Template

Asserting Kotlin Multiplatform Shared Module Template



Asserting Kotlin Multiplatform Shared Module Template

Posted by Ben Trengrove – Developer Relations Engineer, Matt Dyor – Product Supervisor

To empower Android builders, we’re excited to announce Android Studio’s new Kotlin Multiplatform (KMP) Shared Module Template. This template was particularly designed to permit builders to make use of a single codebase and apply enterprise logic throughout platforms. Extra particularly, builders will be capable of add shared modules to present Android apps and share the enterprise logic throughout their Android and iOS purposes.

This makes it simpler for Android builders to craft, preserve, and most significantly, personal the enterprise logic. The KMP Shared Module Template is obtainable inside Android Studio if you create a brand new module inside a undertaking.

a screen shot of the new module tab in Android Studio

Shared Module Templates are discovered beneath the New Module tab

A single code base for enterprise logic

Most builders have grown accustomed to sustaining totally different code bases, platform to platform. Prior to now, every time there’s an replace to the enterprise logic, it have to be rigorously up to date in every codebase. However with the KMP Shared Module Template:

    • Builders can write as soon as and publish the enterprise logic to wherever they want it.
    • Engineering groups can do extra sooner.
    • Person experiences are extra constant throughout your entire viewers, no matter platform or type issue.
    • Releases are higher coordinated and launched with fewer errors.

Clients and developer groups who undertake KMP Shared Module Templates ought to anticipate to realize higher ROI from cell groups who can flip their consideration in the direction of delighting their customers extra and worrying about inconsistent code much less.

KMP enthusiasm

The Android developer group stays very enthusiastic about KMP, particularly after Google I/O 2024 the place Google introduced official help for shared logic throughout Android and iOS. Now we have seen continued momentum and enthusiasm from the group. For instance, there are actually over 1,500 KMP libraries listed on JetBrains’ klibs.io.

Our clients are excited as a result of KMP has made Android builders extra productive. Persistently, Android builders have mentioned that they need options that permit them to share code extra simply and so they need instruments which increase productiveness. That is why we advocate KMP; KMP concurrently delivers an amazing expertise for Android customers whereas boosting ROI for the app makers. The KMP Shared Module Template is the most recent step in the direction of a developer ecosystem the place consumer expertise is constant and purposes are up to date seamlessly.

Giant scale KMP adoptions

This KMP Shared Module Template is new, however KMP extra broadly is a maturing know-how with a number of large-scale migrations underway. In reality, KMP has matured sufficient to help mission crucial purposes at Google. Google Docs, for instance, is now working KMP in manufacturing on iOS with runtime efficiency on par or higher than earlier than. Past Google, Stone’s 130 cell builders are sharing over 50% of their code, permitting present cell groups to ship options roughly 40% sooner to each Android and iOS.

KMP was designed for Android improvement

As at all times, we have designed the Shared Module Template with the wants of Android developer groups in thoughts. Making the KMP Shared Module Template a part of the native Android Studio expertise permits builders to effectively add a shared module to an present Android software and instantly begin constructing shared enterprise logic that leverages a number of KMP-ready Jetpack libraries together with Room, SQLite, and DataStore to call only a few.

Come test it out at KotlinConf

Releasing Android Studio’s KMP Shared Module Template marks a major step towards empowering Android improvement groups to innovate sooner, to effectively handle enterprise logic, and to construct high-quality purposes with higher confidence. It implies that Android builders could be liable for the code that drives the enterprise logic for each app throughout Android and iOS. We’re excited to carry Shared Module Template to KotlinConf in Copenhagen, Might 21 – 23.

KotlinConf 2025 Copenhagen Denmark, May 21 Workshops May 22-23 Conference

Get began with KMP Shared Module Template

To get began, you will want the most recent version of Android Studio. In your Android undertaking, the Shared Module Template is obtainable inside Android Studio if you create a brand new module. Click on on “File” then “New” then “New Module” and eventually “Kotlin Multiplatform Shared Module” and you might be prepared so as to add a KMP Shared Module to your Android app.

We admire any suggestions on belongings you like or options you want to see. When you discover a bug, please report the difficulty. Keep in mind to additionally comply with us on X, LinkedIn, Weblog, or YouTube for extra Android improvement updates!



Supply hyperlink

RELATED ARTICLES

Most Popular

Recent Comments