We’re thrilled to share the exciting news that last week marked our 6th anniversary! 🥳 It’s been an incredible journey dedicated to spreading knowledge about Kotlin, fueled by research, hands-on experience, and continuous practice. While we’ve achieved significant milestones, our journey is far from over — we’re committed to reaching even greater heights.
In gratitude for your support, we’re extending a special birthday offer just for our subscribers: ⭐ a fantastic 60 euros off the regular price for our upcomingopen online workshops!* ⭐ Any Kotlin ebook for only 16 euros!*
Familiarize yourself with the Observable class in Kotlin and experiment with valuable insights in this Kotlin Exercises article. The solution is included!
Uncover the significance of avoiding knowledge repetition and its connection to the single responsibility principle in Item 19 of the “Effective Kotlin. Best Practices” book.
This workshop starts with the basics, ensuring everyone has a solid understanding of coroutines, and then ventures into advanced topics like flow, channels, and coroutine scopes.
Exciting news! The Kotlin Essentials book by Marcin Moskala has just received an update, bringing you even more value. 🚀 Now, after each chapter, dive into practical exercises designed to reinforce and apply your newfound knowledge. More info here.
Explore Effective Kotlin Item 49: “Use caching when possible.” Curious about why and how to implement caching? Delve into our latest article to uncover the answers.
Dive into the world of measuring sequences in Kotlin. Understand when utilizing sequences can boost performance and when it might lead to disadvantages.
Need a quick guide on choosing the right collection types? Don’t understand the intricacies of lists, sets, and maps? Hop in for valuable insights here.
Wondering why you should join hundreds of other Kotlin developers who have become more effective and smart in their daily work? Well…you can trust us, or just check what they say about our workshops. 👇
Pssssst… Do you need to spend your training budget by the end of the year but need more time to determine which course or workshop to decide on? By taking one of our advanced workshops — that will be held at the beginning of 2024 — you will make no mistake! Is the best choice to level up in the right way and spare yourself worries as we can set the payment in 2023.
Don’t miss this opportunity to elevate your Kotlin skills. Check out the latest updates, articles, and workshops to stay at the forefront of Kotlin development.
Happy coding!
Hello Kotlin Enthusiasts, was originally published in Kt. Academy on Medium, where people are continuing the conversation by highlighting and responding to this story.
Kotlin Multiplatform (KMP) is an open-source technology built by JetBrains that allows you to share code across multiple platforms while retaining the benefits of native programming. Supported platforms include iOS, Android, desktop, web, and others.
Today, we’re launching a preview for Kotlin Multiplatform support in Fleet, which simplifies the development of multiplatform applications, adding to the already extensive Kotlin support in Fleet. Please note that if you’re targeting iOS and macOS, you will need Xcode.
When you open a multiplatform project, Fleet will automatically create Run Configurations for the Android and/or iOS platforms, as declared in the project build file. You can use these to execute your application on an Android Virtual Device or the iOS Simulator.
Polyglot Programming
Because Fleet is a polyglot IDE, you don’t have to switch to a different editor or compromise usability when working with the native code in your multiplatform project. When editing Swift code, you have the same rich functionality you would expect in Kotlin and Java, as well as full support for Xcode projects.
Code navigation
Fleet supports cross-language navigation between Swift and Kotlin. For example, when you use the Show Usages action on a Kotlin function, any invocations from Swift code will feature in the results. If there is a single match, then the associated file is displayed.
Refactoring
Refactoring in Fleet is also cross-language. In the example below, if we use Rename Refactoring on the MainViewController type, then the refactoring will apply across both Kotlin and Swift modules.
Debugging
Debugging in Fleet is also cross-language. You can set a breakpoint in Swift code, view values and the call stack in that environment, step into a Kotlin call, and then continue as required.
A single IDE
As you may be aware or have experienced, creating Kotlin Multiplatform applications has oftentimes involved needing to use multiple IDEs in combination. This is still the case when targeting mobile, as Android Studio and Xcode are required. However, our goal with Fleet is to provide a single IDE where you can develop applications without needing to switch tools (Xcode will still be required to be installed when targeting Apple devices, but will not be necessary for daily work).
Pricing model
During the Preview period, Fleet, including the Kotlin Multiplatform Tooling, will remain free. Once we release the tooling, we anticipate the pricing model will be in line with that of Fleet itself. We’ll provide more information closer to the release date.
Our commitment to IntelliJ IDEA and the IntelliJ Platform
Fleet uses the IntelliJ code-processing engine for Swift and all of our Kotlin support, and consequently, we will continue to provide support for Kotlin in IntelliJ IDEA and on the IntelliJ Platform (thus also Android Studio). In addition, we have an ever-increasing base of developers using Kotlin in IntelliJ IDEA, and we want to assure you that innovation and support will continue on this platform.
Having said that, the target audience for IntelliJ IDEA will primarily remain that of server-side developers targeting the JVM. While it will be possible to open, navigate, and build Kotlin Multiplatform projects in IntelliJ IDEA and Android Studio, other features such as platform-specific run configurations, Compose Multiplatform features, and many other things that facilitate multiplatform development will be supported in Fleet only.
How to get started
To get started with Kotlin Multiplatform development and try out all of the cool features we have been working on, you can install the latest version of Fleet via the JetBrains Toolbox App. We also have a brand new online Web Wizard for creating Kotlin Multiplatform projects.
It’s still very early days for Kotlin Multiplatform Tooling in Fleet, and we would love to hear your feedback. Let us know what works, what doesn’t, what is missing, and what you just can’t do without. Leave us a comment on this blog post or use our issue tracker. You can also share any feedback you have on Kotlin Multiplatform, including the tooling, on the #fleet channel on the Kotlin Slack.
Compose Multiplatform is a declarative UI framework built by JetBrains that allows developers to share their applications’ UIs across different platforms. It enables you to reuse up to 100% of your codebase across Android, iOS, desktop, and web. The framework leverages the code-sharing capabilities of the core Kotlin Multiplatform technology, which just became Stable in Kotlin 1.9.20.
This 1.5.10 release of Compose Multiplatform provides support for Kotlin 1.9.20, offers simplified onboarding, introduces a new portal for documentation, and provides the features listed below:
Table of Contents
With these across-the-board improvements, it has never been easier to adopt Compose Multiplatform. Now is a great time for you to start using Compose Multiplatform for cross-platform development, and if you are an existing user, these improvements will make your work more effective than ever.
Easier to get started
If you want to dive into Compose Multiplatform and Kotlin Multiplatform, then we have some great news for you:
The Kotlin Multiplatform Web Wizard lets you easily create new projects in a few clicks. The project contains both shared logic and a Compose Multiplatform UI for multiple platforms.
New onboarding tutorials are available for Android, iOS, and desktop. These will bring you up to speed on the core concepts of Kotlin Multiplatform and Compose Multiplatform.
The Compose Multiplatform documentation has been integrated into the Kotlin Multiplatform Development portal, making it easier and simpler for you to find the information you need.
This release features multiple enhancements to TextFields on iOS. A new Fast Delete mode is available, handling of double and triple taps has been improved, scroll physics includes the ‘rubber band effect’, and a crossfade animation improves interoperability.
Starting with this release, when you hold down Backspace, a new Fast Delete mode activates after the first 21 characters. In this mode each deletion removes two words. This aligns with the default iOS behavior and is what users expect.
Starting with this release, double and triple taps in a TextField are always handled consistently. Double-tapping will always select the current word, while triple-tapping always selects the entire text.
Compose Multiplatform 1.5.0 introduced support for native scroll physics. This release adds support for overscroll (the “rubber band effect”) within large text fields. Your Compose Multiplatform UI will now provide the bounciness that iOS users expect.
Crossfade animation for UIKit interoperability
When you target iOS, Compose Multiplatform allows you to embed composables within a UIKit component hierarchy. This enables you to combine your Kotlin UI components with existing Swift or Objective-C widgets.
Starting with this release, when embedding composables within a UIKit hierarchy, a crossfade animation is applied to the screen as the orientation transitions. This prevents components from temporarily appearing stretched.
Increased compilation speed
In Kotlin 1.9.20, compiler caching and Compose Multiplatform are compatible. So, starting from this release, compiler caching is automatically enabled for Compose Multiplatform applications that use the Kotlin 1.9.20 compiler. Compilation is much faster for all compilations after the initial one.
Caching remains disabled when you use Compose Multiplatform with an earlier version of the Kotlin compiler. Manually setting kotlin.native.cacheKind to none causes the Gradle compiler plugin to produce an error, so please remove this if present.
Basic support for the K2 compiler
In this release, we introduce partial support for the K2 compiler in Compose Multiplatform. You can use the Compose Compiler and K2 in combination to build basic applications. Full support for K2 is scheduled for the next CMP release, so stay tuned.
Enhanced rendering performance on iOS
In this release, we’ve improved performance on iOS by eliminating any instances of redundant or overly eager processing. In addition, the commands to be run on the GPU for rendering are prepared in a separate thread.
These changes mean that Compose Multiplatform apps running on iOS will have fewer missed frames. Any stutters or lags caused by missed frames will be reduced or removed.
New documentation portal
The new Kotlin Multiplatform Development Portal features tutorials, a FAQ, brand new samples, and other helpful documentation. This means getting started with Compose Multiplatform is easier than ever!
Grouping Compose Multiplatform materials with other multiplatform documentation, on a dedicated portal, makes them easier to find and consume. While some documentation remains on the Compose Multiplatform GitHub, our aim is to transfer it to the new portal soon.
There has never been a better time to get started with Compose Multiplatform! You can use the Compose Material 3 widgets to build beautiful user interfaces that behave consistently on Android, iOS, desktop, and web. Using the Kotlin Multiplatform Web Wizard you can be up and running in minutes, with the new onboarding tutorials to guide you as you build your first Compose Multiplatform applications.
We hope you’ll find building applications with Compose Multiplatform a fun and rewarding experience. Please provide feedback on how you get on. We invite you to join the discussion on the Kotlin Slack in the #compose channel, where you can discuss general topics related to Compose Multiplatform and Jetpack Compose.
In a highly anticipated move, Kotlin Multiplatform, an open-source technology built by JetBrains that allows developers to share code across platforms while retaining the benefits of native programming, has become Stable and is now 100% ready for use in production.
Read on to learn about the evolution of Kotlin Multiplatform (KMP), how it can streamline your development process, and what educational resources are available for you to get the most out of the technology.
Designed with a core focus on flexibility and adaptability, Kotlin Multiplatform (KMP) blurs the boundaries between cross-platform and native development. It allows developers to reuse as much code as they want, write native code if and as needed, and seamlessly integrate shared Kotlin code into any project.
Since the first release of KMP, its flexibility has attracted many prominent companies, such as Netflix, Philips, McDonald’s, 9GAG, and Baidu. Many teams have already been capitalizing on KMP’s ability to be gradually integrated, as well as its low adoption risk. Some of them share isolated critical parts of their existing Kotlin code to improve the stability of their apps. Others, aiming to reuse as much code as possible without compromising app quality, share all application logic across mobile, desktop, web, and TV while maintaining native UIs.
With KMP being widely used in production since its Alpha release, JetBrains has been able to gather extensive feedback and refine the technology to provide a better multiplatform development experience in the Stable version, including the following.
Strict compatibility guarantees
The core of the Kotlin Multiplatform technology consists of many parts, such as compiler support, language features, the libraries API, IDEs, build tooling, and more. All of these cover the most popular code-sharing use-cases and are stable in Kotlin 1.9.20. “Stable” means that we will evolve those parts following strict compatibility rules, so you can confidently use them in your code.
Going beyond the core, KMP also has some more advanced parts that we’re still continuing to work on. Expect/actual classes are an example of such functionality (not to be confused with expect/actual functions, which are fully stable in Kotlin 1.9.20). Such features are explicitly marked as non-stable, and Kotlin will inform you when you’re using them. Please pay attention to the experimentality warnings and the corresponding documentation to make an informed decision about using or not using such features in your projects.
Better build setup user experience
To simplify project setup and maintenance, we’ve introduced the default hierarchy template. This new feature of the Kotlin Gradle plugin automatically configures Kotlin Source Sets for popular scenarios and reduces the amount of boilerplate in typical build scripts.
To help you diagnose build misconfigurations and errors, KMP delivers a couple of improvements in Stable:
Approximately 50 diagnostics were added to the Kotlin Gradle plugin, helping to detect common build issues and providing quick tips on how to fix them.
Moving Kotlin/Native compiler cache management from the Kotlin Gradle plugin to the compiler makes possible further improvements to compilation times and compiler cache flexibility.
Thanks to all of these advancements, Kotlin Multiplatform can be used without hesitation for sharing code in production across Android, iOS, desktop (JVM), server-Side (JVM), and web, even in the most conservative usage scenarios.
Use the power of the growing Kotlin Multiplatform ecosystem
The evolution of Kotlin Multiplatform isn’t limited to the technology itself, but extends to its thriving ecosystem cultivated by thousands of Kotlin developers worldwide. Since Beta, the number of KMP libraries has multiplied, offering diverse tools for networking, data storage, arithmetics, analytics, and more, enabling swift and confident app development.
The Android team at Google is continuing to support KMP users by providing the experimental multiplatform versions of Jetpack libraries, and they’ve already made the Collections, DataStore, Annotations, and Paging libraries compatible with Kotlin Multiplatform.
The KMP ecosystem also offers a range of tools for the iOS developer experience, with SKIE by Touchlab standing out. It generates Swift code that provides a Swift-friendly API layer, which bridges important Kotlin types, and implements seamless Coroutines interoperability.
Get even more code-sharing freedom with Compose Multiplatform
Compose Multiplatform, a modern declarative cross-platform UI framework by JetBrains, is a significant part of the ever-expanding KMP ecosystem. With Compose Multiplatform, you now have full code-sharing flexibility. Share just one piece of logic, all application logic, or both the logic and the UI, depending on your project’s and team’s requirements:
Compose Multiplatform for Android and desktop (JVM) is already Stable, while support for iOS is currently in Alpha and support for web (Wasm) is Experimental.
Explore the future of Kotlin Multiplatform
JetBrains continues to enhance multiplatform development with Kotlin, aiming to make it the ultimate choice for sharing code across platforms:
Future updates for the core Kotlin Multiplatform technology will improve the iOS developer experience, including direct Kotlin-to-Swift interoperability and SwiftPM support.
The next milestone for Compose Multiplatform for iOS is Beta support in 2024.
JetBrains is actively developing Kotlin/Wasm to facilitate modern web development with KMP, aiming to deliver the Alpha version of Compose Multiplatform for Web (Wasm) next year.
And that’s not all. In the upcoming weeks, get ready for some thrilling announcements regarding the evolution of Kotlin Multiplatform tooling!
Get started with Kotlin Multiplatform
Begin your journey with our extensive, user-friendly educational resources.
Participate in our Kotlin Multiplatform Webinar November Series to get insights directly from JetBrains experts! Explore Kotlin Multiplatform features, build KMP apps with both native and shared UIs, and uncover iOS development tips and tricks:
The new Kotlin Multiplatform Development Portal offers detailed documentation, getting-started guides, and step-by-step tutorials covering all aspects of building apps with Kotlin Multiplatform and Compose Multiplatform:
As the Kotlin Multiplatform stable release emerges on the horizon, its ecosystem continues to evolve and flourish, thanks in no small part to the enthusiastic Kotlin community. What’s more, the Compose Multiplatform 1.5.10 release is around the corner, which has only added to the excitement surrounding this technology’s capabilities. With that said, we want to announce the new round of the Kotlin Multiplatform Content Creators Recognition Campaign, highlighting the contributions of those passionate individuals who have been instrumental in keeping the community informed, engaged, and inspired.
Kotlin Multiplatform has captured the imagination of developers worldwide and has motivated content creators to share their how-tos, various articles packed with actionable tips, video tutorials, and sample projects. We want to shine a spotlight on this content that provides valuable insights, guidance, and inspiration to learners, enthusiasts, and professionals in the field.
Let’s introduce the latest round of finalists whose work has stood out in this Recognition Campaign.
[📖 Article] Writing Swift-friendly Kotlin Multiplatform APIs – This is a whole series of articles covering how to write Kotlin Multiplatform libraries that work smoothly with Swift by André Oriani.
[📖 Article] Configurable Features using Kotlin Multiplatform – Artem Zasypalov discusses the YAZIO team’s approach to creating configurable features in their app using Kotlin Multiplatform in an effort to make their Onboarding feature flexible and fully configurable.
[📖 Article] Implementing a 2-month Large-scale Banking POC with Kotlin Multiplatform – Imre Kaszab talks about how the Apter team developed a Proof of Concept (POC) for a banking application using KMP, taking their client’s needs into account, like maximum code sharing, extensive test coverage, modular structure, and rapid feature delivery.
[📖 Article] Meet “Y-Charts”: an Open-source Jetpack Compose chart library – Codeangi introduces Y-Charts, a Jetpack Compose-based charts library that enables developers to easily integrate various types of charts and graphs into their existing UI to visually represent statistical data.
Whether you’re a seasoned developer looking to expand your skillset or a newcomer eager to learn more about the Kotlin Multiplatform technology, we encourage you to explore this content, which provides a treasure trove of information.
And if you also have ideas to share, seize the opportunity to become a part of the Kotlin Multiplatform community of content creators! We choose our favorite new content once every three months and highlight it in the official Kotlin resources:
Are you struggling to come up with ideas for content? Use the following list of the most requested Kotlin Multiplatform topics for inspiration:
Use cases of what you have shared with Kotlin Multiplatform.
Experiments with cutting-edge Kotlin Multiplatform tools and libraries
Experience with Compose Multiplatform for iOS.
Migrating large projects to Kotlin Multiplatform.
Don’t limit yourself to these topics! Feel free to share your expertise and experience on another subject. Just don’t forget to add the #kotlinmultiplatform tag if the media platform you’re using allows it.
We’re excited to see how our community will continue to shape the Kotlin Multiplatform landscape in the future. Cheers to the creators who keep our community vibrant and thriving!
Today we would like to share some really interesting articles and exciting news.
Curious?
Check it all out!
The second edition of Effective Kotlin
We are very excited to present you with the new, second edition of the Effective Kotlin book. New Items, new examples, and only the latest Kotlin best practices all in one place!
Are you a student or recent graduate? Have you already tried building projects with Kotlin Multiplatform, a trending technology that lets you build apps for Android, iOS, desktop, web, and server while sharing Kotlin code between all the platforms?
If so, don’t miss this opportunity to practice your multiplatform coding skills by taking part in the Kotlin Multiplatform Contest. Create a cross-platform project in Kotlin, and if your entry takes one of the top three spots, you’ll win a trip to the biggest Kotlin event of the year – KotlinConf’24 in Copenhagen, Denmark!
The top 3 winners will get an all-expenses-paid KotlinConf’24 participant package, covering KotlinConf tickets, travel, accommodation, and cool Kotlin swag.
The authors of all other valid entries will receive neat Kotlin souvenirs, in addition to valuable experience.
Don’t forget to join our #kotlin-multiplatform-contest channel on Slack. Here you can ask questions, connect with fellow contestants, and share your insights.