Summary
This chapter has hopefully illustrated the interesting potential of Kotlin multiplatform to achieve code sharing between multiple targets. Kotlin multiplatform differs from other cross-platform solutions. In this, it aims to share logic and models, not UI. Because of this distinction, Kotlin multiplatform offers a lower-risk proposition when compared to frameworks such as React Native or Flutter. It is quite simple to write a small function or model in Kotlin and then share that across multiple platforms, where it can be consumed as a simple dependency.
Kotlin multiplatform projects can be configured and built via Gradle, making it easy to define various build targets and then generate any required build artifacts. Within a Kotlin ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access