From 18589938f59f50249f5547300c8c2527e60d5990 Mon Sep 17 00:00:00 2001 From: akurasov Date: Thu, 2 Dec 2021 14:25:59 +0300 Subject: [PATCH] Jetpack interop manual --- tutorials/Development_for_Android/README.md | 28 +++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 tutorials/Development_for_Android/README.md diff --git a/tutorials/Development_for_Android/README.md b/tutorials/Development_for_Android/README.md new file mode 100644 index 0000000000..70fe62542f --- /dev/null +++ b/tutorials/Development_for_Android/README.md @@ -0,0 +1,28 @@ +# Development for Android + +## What is covered + +This tutorial covers topic of using Compose Multiplatform for multiplatform build that includes Android + +## Intro + +Compose Multiplatform doesn't contain any Android artifacts. Instead it references Jetpack Compose Android artifacts published by Google + +## Usage + +Jetpack Compose interoperability is enabled on publication level - nothing needs to be explicitly enabled. +The easiest way to start is to use Kotlin Project Wizard with Compose Multiplatform template - one of the target platfrom is Android. + +If you want to create it manually, the following needs to be done: +- Create a Kotlin multiplatform project +- Enable Kotlin Gradle plugin (kotlin("multiplatform")) +- Enable Compose Multiplatform Gradle plugin (id("org.jetbrains.compose")) +- Add common Compose dependency to the Common module (e.g. api(compose.runtime)) + +This is it. During compilation for Android platform, Jetpack Compose artifacts will be picked automatically. + +## Versioning + +Compose Multiplatform 1.0 references Jetpack Compose 1.1.0-beta02. If you want to use higher version, you could explicitly +add Jetpack Compose dependencies to the Android module. However please note, that Kotlin Compiler compatibility should be considered. +