I recently created my first (iOS & Android) Compose Multiplatform application using the official guide and template app here:
Compose Multiplatform official GitHub
As I was trying to port an existing native compose app over to Compose Multiplatform. I decided to start by trying to add a library that I use in the existing application:
I added the gradle dependency to the commonMain dependencies section:
sourceSets {
val commonMain by getting {
dependencies {
...
implementation("com.wajahatkarim:flippable:1.0.6")
Gradle sync was successful but unfortunately none of the packages or classes can be resolved in the shared Compose Multiplatform code.
Does this mean that Compose Multiplatform can only be used with very specific 3rd party api's developed specifically for Compose Multiplatform? Or is there some other way to use 3rd party Compose Libraries in this way?
Does this mean that Compose Multiplatform can only be used with very specific 3rd party api's developed specifically for Compose Multiplatform?
Yes
Or is there some other way to use 3rd party Compose Libraries in this way?
No
However, looking at the code, it appears to be 2 Kotlin files, and none of the imported dependencies seem to be outside of what would be available in multiplatform, so you could fork the library and convert it to multiplatform, or possibly just copy/paste those files into your codebase.