https://kotlinlang.org logo
Title
a

Adam Brown

02/20/2021, 6:07 PM
My second question is, I don't see any dependency declarations for the various android compose libraries, are these being automagically imported for me? If so by what? And which ones exactly? I wanted to use the compose navigation library, and I don't know if it's being automatically imported for me by something, or if I need to include it my self.
t

TheMrCodes

02/20/2021, 6:23 PM
Look into the multiplatform project build.gradle compose should be declared as a plugin and later imported as a dependency
a

Adam Brown

02/20/2021, 6:25 PM
ok right, so I see the plugin:
plugins {
    kotlin("multiplatform")
    id("org.jetbrains.compose") version "0.2.0-build132"
    id("com.android.library")
    id("kotlin-android-extensions")
}
But I don't see any inclusion in dependencies anywhere
should I?
a

Adam Brown

02/20/2021, 6:29 PM
oohhhhh
ok
huh well those are there, but autocomplete/autoimport still has no idea about them...
HA
ok so i looked at where those were defined and saw the UI one which was not included by default
api(compose.ui)
now auto-complete works
👍 2
thanks guys
and to be clear, I can't use stock Android compose stuff like Navigation right? It needs to be adapted for Desktop Compose/multiplatform?
a

Arkadii Ivanov

02/20/2021, 6:33 PM
Compose Navigation library is currently android-only. There is the Navigation tutorial available: https://github.com/JetBrains/compose-jb/blob/master/tutorials/Navigation/README.md
a

Adam Brown

02/20/2021, 6:34 PM
oh very cool. Is there a decent directory anywhere for Desktop compatible compose libraries?
s

SrSouza

02/21/2021, 4:27 AM
Is import to know that Compose JB is not compatíble with any library for Jetbrains Compose, currently they are diferent artifacts and builds, so if you are building a multiplatform project, if you use any Jetbrains Compose Focus library, your Android target Will break
Think that Compose JB is a complete diferent project that IS not compatible with Jetpack Compose, for now
a

Adam Brown

02/21/2021, 4:41 AM
Not sure I completely understand. I know people do make multiplatform projects that share compose code between Android and Desktop