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 to add shared modules to current Android apps and share the enterprise logic throughout their Android and iOS functions.
This makes it simpler for Android builders to craft, keep, and most significantly, personal the enterprise logic. The KMP Shared Module Template is out there inside Android Studio once you create a brand new module inside a undertaking.
A single code base for enterprise logic
Most builders have grown accustomed to sustaining completely different code bases, platform to platform. Previously, each time there’s an replace to the enterprise logic, it should be fastidiously 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.
- Consumer experiences are extra constant throughout your entire viewers, no matter platform or kind 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 larger 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 assist for shared logic throughout Android and iOS. We have now seen continued momentum and enthusiasm from the group. For instance, there at the moment are over 1,500 KMP libraries listed on JetBrains’ klibs.io.
Our prospects are excited as a result of KMP has made Android builders extra productive. Persistently, Android builders have mentioned that they need options that enable them to share code extra simply and so they need instruments which enhance productiveness. This is the reason we suggest KMP; KMP concurrently delivers an important expertise for Android customers whereas boosting ROI for the app makers. The KMP Shared Module Template is the newest step in the direction of a developer ecosystem the place person expertise is constant and functions are up to date seamlessly.
Massive 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 assist mission vital functions 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 current 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 current Android utility and instantly begin constructing shared enterprise logic that leverages a number of KMP-ready Jetpack libraries together with Room, SQLite, and DataStore to call just some.
Come test it out at KotlinConf
Releasing Android Studio’s KMP Shared Module Template marks a big step towards empowering Android improvement groups to innovate sooner, to effectively handle enterprise logic, and to construct high-quality functions with larger confidence. It signifies that Android builders will be chargeable for the code that drives the enterprise logic for each app throughout Android and iOS. We’re excited to deliver Shared Module Template to KotlinConf in Copenhagen, Might 21 – 23.
Get began with KMP Shared Module Template
To get began, you will want the newest version of Android Studio. In your Android undertaking, the Shared Module Template is out there inside Android Studio once you create a brand new module. Click on on “File” then “New” then “New Module” and eventually “Kotlin Multiplatform Shared Module” and you’re 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. In case you discover a bug, please report the difficulty. Bear in mind to additionally comply with us on X, LinkedIn, Weblog, or YouTube for extra Android improvement updates!
No Comment! Be the first one.