Asserting Kotlin Multiplatform Shared Module Template

0
1
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 to add shared modules to current 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 once you create a brand new module inside a challenge.

a screen shot of the new module tab in Android Studio

Shared Module Templates are discovered below the New Module tab

A single code base for enterprise logic

Most builders have grown accustomed to sustaining completely different code bases, platform to platform. Up to now, every time there’s an replace to the enterprise logic, it have to 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.
    • Person 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 count on to realize higher ROI from cellular 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 neighborhood 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 now have seen continued momentum and enthusiasm from the neighborhood. For instance, there at the moment are 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 stated that they need options that enable them to share code extra simply they usually need instruments which increase productiveness. For this reason we suggest 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 person 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 actual fact, KMP has matured sufficient to assist 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 cellular builders are sharing over 50% of their code, permitting current cellular groups to ship options roughly 40% sooner to each Android and iOS.

KMP was designed for Android improvement

As all the time, 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 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 signifies that Android builders could be chargeable 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, Could 21 – 23.

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

Get began with KMP Shared Module Template

To get began, you may want the most recent version of Android Studio. In your Android challenge, the Shared Module Template is obtainable inside Android Studio once you create a brand new module. Click on on “File” then “New” then “New Module” and at last “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 stuff you like or options you want to see. For those who discover a bug, please report the problem. Bear in mind to additionally observe us on X, LinkedIn, Weblog, or YouTube for extra Android improvement updates!

LEAVE A REPLY

Please enter your comment!
Please enter your name here