Hi guys, I have a question around a Multiplatform...
# multiplatform
s
Hi guys, I have a question around a Multiplatform SDK. I'm wondering if it's possible to build UI Components in the Android Portion of the SDK only to be consumed within a regular android app? (Jetpack Compose preferred, but open to Jetbrains Compose)
I think I just found my answer here, I should use Jetbrains Compose: Compose Multiplatform build doesn't contain any Android artifacts. Instead it references Jetpack Compose Android artifacts published by Google. This way we ensure that libraries built for Android using Jetpack libraries are compatible with Compose Multiplatform. https://github.com/JetBrains/compose-jb/tree/master/tutorials/Development_for_Android
j
Any dependencies and code you include in the androidMain source set will only be compiled into the Android binary for the library. So you could add Jetpack Compose to the androidMain source set dependencies and write UI code in this source set that you want to be included in the Android target output. You could also include JetBrains Compose as a dependency in a common source set for supported JetBrains Compose platforms and have those UI components available in your library for those supported platforms (i.e. Android + JVM).