برچسب: Multiplatform

  • Android’s Kotlin Multiplatform announcements at Google I/O and KotlinConf 25



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

    Google I/O and KotlinConf 2025 bring a series of announcements on Android’s Kotlin and Kotlin Multiplatform efforts. Here’s what to watch out for:

    Announcements from Google I/O 2025

    Jetpack libraries

    Our focus for Jetpack libraries and KMP is on sharing business logic across Android and iOS, but we have begun experimenting with web/WASM support.

    We are adding KMP support to Jetpack libraries. Last year we started with Room, DataStore and Collection, which are now available in a stable release and recently we have added ViewModel, SavedState and Paging. The levels of support that our Jetpack libraries guarantee for each platform have been categorised into three tiers, with the top tier being for Android, iOS and JVM.

    Tool improvements

    We’re developing new tools to help easily start using KMP in your app. With the KMP new module template in Android Studio Meerkat, you can add a new module to an existing app and share code to iOS and other supported KMP platforms.

    In addition to KMP enhancements, Android Studio now supports Kotlin K2 mode for Android specific features requiring language support such as Live Edit, Compose Preview and many more.

    How Google is using KMP

    Last year, Google Workspace began experimenting with KMP, and this is now running in production in the Google Docs app on iOS. The app’s runtime performance is on par or better than before1.

    It’s been helpful to have an app at this scale test KMP out, because we’re able to identify issues and fix issues that benefit the KMP developer community.

    For example, we’ve upgraded the Kotlin Native compiler to LLVM 16 and contributed a more efficient garbage collector and string implementation. We’re also bringing the static analysis power of Android Lint to Kotlin targets and ensuring a unified Gradle DSL for both AGP and KGP to improve the plugin management experience.

    New guidance

    We’re providing comprehensive guidance in the form of two new codelabs: Getting started with Kotlin Multiplatform and Migrating your Room database to KMP, to help you get from standalone Android and iOS apps to shared business logic.

    Kotlin Improvements

    Kotlin Symbol Processing (KSP2) is stable to better support new Kotlin language features and deliver better performance. It is easier to integrate with build systems, is thread-safe, and has better support for debugging annotation processors. In contrast to KSP1, KSP2 has much better compatibility across different Kotlin versions. The rewritten command line interface also becomes significantly easier to use as it is now a standalone program instead of a compiler plugin.

    KotlinConf 2025

    Google team members are presenting a number of talks at KotlinConf spanning multiple topics:

    Talks

      • Deploying KMP at Google Workspace by Jason Parachoniak, Troels Lund, and Johan Bay from the Workspace team discusses the challenges and solutions, including bugs and performance optimizations, encountered when launching Kotlin Multiplatform at Google Workspace, offering comparisons to ObjectiveC and a Q&A. (Technical Session)

      • The Life and Death of a Kotlin/Native Object by Troels Lund offers a high-level explanation of the Kotlin/Native runtime’s inner workings concerning object instantiation, memory management, and disposal. (Technical Session)

      • APIs: How Hard Can They Be? presented by Aurimas Liutikas and Alan Viverette from the Jetpack team delves into the lifecycle of API design, review processes, and evolution within AndroidX libraries, particularly considering KMP and related tools. (Technical Session)

      • Project Sparkles: How Compose for Desktop is changing Android Studio and IntelliJ with Chris Sinco and Sebastiano Poggi from the Android Studio team introduces the initiative (‘Project Sparkles’) aiming to modernize Android Studio and IntelliJ UIs using Compose for Desktop, covering goals, examples, and collaborations. (Technical Session)

      • JSpecify: Java Nullness Annotations and Kotlin presented by David Baker explains the significance and workings of JSpecify’s standard Java nullness annotations for enhancing Kotlin’s interoperability with Java libraries. (Lightning Session)

      • Lessons learned decoupling Architecture Components from platform specific code features Jeremy Woods and Marcello Galhardo from the Jetpack team sharing insights from the Android team on decoupling core components like SavedState and System Back from platform specifics to create common APIs. (Technical Session)

      • KotlinConf’s Closing Panel, a regular staple of the conference, returns, featuring Jeffrey van Gogh as Google’s representative on the panel. (Panel)

    Live Workshops

    If you are at KotlinConf in person, we will have guided live workshops with our new codelabs from above.

      • The codelab Migrating Room to Room KMP, also led by Matt Dyor, and Dustin Lam, Tomáš Mlynarič, demonstrates the process of migrating an existing Room database implementation to Room KMP within a shared module.

    We love engaging with the Kotlin community. If you are attending KotlinConf, we hope you get a chance to check out our booth, with opportunities to chat with our engineers, get your questions answered, and learn more about how you can leverage Kotlin and KMP.

    Learn more about Kotlin Multiplatform

    To learn more about KMP and start sharing your business logic across platforms, check out our documentation and the sample.

    Explore this announcement and all Google I/O 2025 updates on io.google starting May 22.

    1 Google Internal Data, March 2025



    Source link

  • Announcing Kotlin Multiplatform Shared Module Template



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

    To empower Android developers, we’re excited to announce Android Studio’s new Kotlin Multiplatform (KMP) Shared Module Template. This template was specifically designed to allow developers to use a single codebase and apply business logic across platforms. More specifically, developers will be able to add shared modules to existing Android apps and share the business logic across their Android and iOS applications.

    This makes it easier for Android developers to craft, maintain, and most importantly, own the business logic. The KMP Shared Module Template is available within Android Studio when you create a new module within a project.

    a screen shot of the new module tab in Android Studio

    Shared Module Templates are found under the New Module tab

    A single code base for business logic

    Most developers have grown accustomed to maintaining different code bases, platform to platform. In the past, whenever there’s an update to the business logic, it must be carefully updated in each codebase. But with the KMP Shared Module Template:

      • Developers can write once and publish the business logic to wherever they need it.
      • Engineering teams can do more faster.
      • User experiences are more consistent across the entire audience, regardless of platform or form factor.
      • Releases are better coordinated and launched with fewer errors.

    Customers and developer teams who adopt KMP Shared Module Templates should expect to achieve greater ROI from mobile teams who can turn their attention towards delighting their users more and worrying about inconsistent code less.

    KMP enthusiasm

    The Android developer community remains very excited about KMP, especially after Google I/O 2024 where Google announced official support for shared logic across Android and iOS. We have seen continued momentum and enthusiasm from the community. For example, there are now over 1,500 KMP libraries listed on JetBrains’ klibs.io.

    Our customers are excited because KMP has made Android developers more productive. Consistently, Android developers have said that they want solutions that allow them to share code more easily and they want tools which boost productivity. This is why we recommend KMP; KMP simultaneously delivers a great experience for Android users while boosting ROI for the app makers. The KMP Shared Module Template is the latest step towards a developer ecosystem where user experience is consistent and applications are updated seamlessly.

    Large scale KMP adoptions

    This KMP Shared Module Template is new, but KMP more broadly is a maturing technology with several large-scale migrations underway. In fact, KMP has matured enough to support mission critical applications at Google. Google Docs, for example, is now running KMP in production on iOS with runtime performance on par or better than before. Beyond Google, Stone’s 130 mobile developers are sharing over 50% of their code, allowing existing mobile teams to ship features approximately 40% faster to both Android and iOS.

    KMP was designed for Android development

    As always, we’ve designed the Shared Module Template with the needs of Android developer teams in mind. Making the KMP Shared Module Template part of the native Android Studio experience allows developers to efficiently add a shared module to an existing Android application and immediately start building shared business logic that leverages several KMP-ready Jetpack libraries including Room, SQLite, and DataStore to name just a few.

    Come check it out at KotlinConf

    Releasing Android Studio’s KMP Shared Module Template marks a significant step toward empowering Android development teams to innovate faster, to efficiently manage business logic, and to build high-quality applications with greater confidence. It means that Android developers can be responsible for the code that drives the business logic for every app across Android and iOS. We’re excited to bring Shared Module Template to KotlinConf in Copenhagen, May 21 – 23.

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

    Get started with KMP Shared Module Template

    To get started, you’ll need the latest edition of Android Studio. In your Android project, the Shared Module Template is available within Android Studio when you create a new module. Click on “File” then “New” then “New Module” and finally “Kotlin Multiplatform Shared Module” and you are ready to add a KMP Shared Module to your Android app.

    We appreciate any feedback on things you like or features you would like to see. If you find a bug, please report the issue. Remember to also follow us on X, LinkedIn, Blog, or YouTube for more Android development updates!



    Source link

  • Kodeco Podcast: Mastering Multiplatform: Flutter vs KMP – Podcast V2, S3 E5

    Kodeco Podcast: Mastering Multiplatform: Flutter vs KMP – Podcast V2, S3 E5


    If you’ve ever wondered how to choose between Flutter and Kotlin Multiplatform—or what it’s like to use both in real-world production apps—this special double-length episode is your definitive guide. Google Developer Experts Roman Jaquez and Kevin Moore join us to unpack the realities of cross-platform mobile development. From cutting-edge healthcare apps to Bluetooth integrations and developer best practices, Roman and Kevin share deep insights, honest comparisons, and tips for mastering multi-platform dev in 2025.

    [Subscribe in Apple Podcasts] [Listen in Spotify] [RSS Feed]

    Interested in sponsoring a podcast episode? Check out our Advertise With Kodeco page to find out how!

    Show Notes

    Join Jenn and Dru for a deep dive into the world of cross-platform development with two expert guests: Roman Jaquez and Kevin Moore. From architecture to animations, this episode explores the strengths, trade-offs, and future of Flutter and Kotlin Multiplatform (KMP). The conversation also covers practical advice for testing, performance, state management, and how to future-proof your skills as a mobile developer.

    Highlights from this episode:

    • How Flutter and Kotlin Multiplatform (KMP) compare in real-world app development—including where each shines.
    • Roman’s journey bringing Flutter into a large healthcare organization and the productivity gains that followed.
    • Kevin’s experience building cross-platform apps with Flutter and integrating native Bluetooth code through plugins.
    • Best practices for managing app architecture, UI consistency, and platform-specific code in Flutter and KMP.
    • State management options like Provider, Riverpod, and Bloc—when to use them and what to watch out for.
    • Tools and techniques for performance optimization, testing, and debugging across platforms.
    • Roman and Kevin’s thoughts on the future of mobile development—from hot reload to AI-driven coding tools.

    Mentioned in This Episode

    Contact Kevin, Roman & the Hosts

    Follow Kodeco

    Where to Go From Here?

    We hope you enjoyed this episode of our podcast. Be sure to subscribe in Apple Podcasts or Spotify to get notified when the next episode comes out.

    Hoping to learn more about a particular aspect of mobile development or life and work as a dev? Please write in and tell us and we’ll do our best to make that happen! Write in too if you yourself would like to be a guest or your have a particular guest request and we’ll see what we can do. Drop a comment here, or email us anytime at podcast@teamkodeco.com.



    Source link

  • Kotlin Multiplatform by Tutorials | Kodeco

    Kotlin Multiplatform by Tutorials | Kodeco


    This book is for mobile developers and managers who want to explore how they can use Kotlin Multiplatform in different use cases to share code across Android, iOS and desktop apps. If you want to reduce development and testing time by writing certain parts of your apps only once, this book will help.

    • Jetpack Compose Android
    • Compose Multiplatform
    • SwiftUI
    • Testing
    • Dependency Injection with Koin
    • Persistence using SQLDelight
    • Serialization
    • Ktor
    • Concurrency using coroutines

    The best book to teach you how to share code across platforms using Kotlin Multiplatform. You’ll gain the foundation of creating user interfaces using native UI toolkits and then writing common code for serialization, networking and persistence. You’ll also learn how dependency injection, testing and different architectures fit in with…


    more

    This section tells you a few things you need to know before you get started, such as what you’ll need for hardware and software, where to find the project files for this book, and more.

    One of the core benefits of Kotlin Multiplatform is that you can share code across native apps. You can continue to develop the UI layer using native UI toolkits like Jetpack Compose for Android and SwiftUI for iOS.

    In this section, you’ll learn how to add a new Gradle module to write your business logic only once. You’ll also learn how to create the native UI for Android, iOS and desktop apps, all while sharing the common module.

    Kotlin Multiplatform (KMP) is one of the latest technologies to help you share code across platforms. This chapter introduces you to KMP, how you can use it across app layers and how to set up your first KMP project.

    Having reliable build tools and consistent dependency versions is crucial to getting started on a multiplatform project. This chapter will cover how you can use Gradle and its buildSrc module to provide dependencies to all modules. You’ll also learn how to share business logic across target platforms using a multiplatform time zone library.

    Jetpack Compose is a new declarative library aimed at simplifying UI development on Android. This chapter will walk you through creating multiple screens for your app using Jetpack Compose.

    SwiftUI is the modern way to program UI for iOS applications. In this chapter, you’ll learn how to develop the UI for iOS using the SwiftUI framework.

    It’s now possible to share the same UI code across desktop and Android applications. In this chapter, you’ll learn how to develop the UI for desktop using the new Compose Multiplatform declarative library.

    To effectively share code across apps, there are multiple things to keep in mind: access to platform-specific APIs, support for existing software engineering practices and persistence.

    In this section, you’ll learn how to use Kotlin features to access platform-specific APIs in your shared module and how Kotlin Multiplatform fits in with your current architecture. You’ll also learn about dependency injection and how you can use it to test features present in your shared modules. Finally, you’ll learn how to use a common codebase to handle persistence on different platforms.

    When working with KMP, you’ll often need to access platform-specific APIs. In this chapter, you’ll take a deeper dive into the expect/actual pattern and how you can use them to access platform-specific APIs.

    Software architecture is one of the most crucial aspects that affect quality and maintainability over time. In this chapter, you’ll get an overview of different architectures and how you can use one of them in your KMP application.

    Writing tests is an important part of writing code confidently. This chapter will provide an overview of adding unit tests and UI tests to an app created using KMP.

    Dependency Injection is a technique that leads to maintainable and testable code. This chapter will provide an overview of integrating the Koin dependency injection library into a multiplatform project.

    Most modern applications need to persist data across sessions. This chapter will provide an overview of data persistence in KMP. It discusses key-value saving as well as using an SQL database.

    Networking is crucial to most modern apps, and it usually involves implementing similar logic using different frameworks and languages. Under the hood, it also involves concepts like serialization and concurrency. Fortunately, Kotlin Multiplatform has dedicated libraries for each of these.

    In this section, you’ll learn how to use serialization to decode JSON data to Kotlin objects. You’ll then learn how to use a common networking library that leverages this common serialization to fetch data from the internet. To make the networking performant, you’ll also learn about concurrency in Kotlin using coroutines and the considerations for different platforms. Finally, you’ll learn how to extract an existing feature to a Kotlin Multiplatform library and also different ways of publishing this library.

    When transmitting data over a network, you need to serialize and deserialize it. In this chapter, you’ll learn how to use serialization in a Kotlin Multiplatform project.

    Networking is one of the core features of any modern app. In this chapter, you’ll lean how to use networking in a Kotlin Multiplatform project.

    In this chapter, you’ll learn how to deal with concurrency in your Kotlin Multiplatform projects.

    In this chapter, you’ll learn how you can migrate an existing feature to KMP. You also learn how to publish a shared library and make it available for Android, iOS and desktop.

    In this chapter, you’ll learn about several functionalities of Kotlin and their comparison with Swift.

    Xcode doesn’t support debugging Kotlin Native code out of the box. In this chapter, you’ll learn how you can debug your shared code module from Xcode.

    In this chapter, you’ll learn how you can share your Compose UI between Android, desktop, and iOS apps.



    Source link