Closed gmazzotta-wise closed 5 months ago
Just had the time to have a deeper look into this topic. I'm not sure if it is even possible to make the change you are asking for. Coil 3, which is in alpha right now, has become a multiplatform library as well. And even their .module
points to org.jetbrains.compose.*
.
Do you know how to make it work?
I haven't dipped my toes into the Kotlin Multiplatform world yet, so I'm not sure how all of this should work, but looking at this better, I think the libraries from Jetbrains are there simply to pull in the actual library for the selected target.
For example, this is what the dependency graph shows:
+--- com.valentinilk.shimmer:compose-shimmer:1.2.0
| \--- com.valentinilk.shimmer:compose-shimmer-android:1.2.0
| +--- org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.9.10 (*)
| +--- org.jetbrains.kotlin:kotlin-stdlib-common:1.9.10 -> 1.9.20 (*)
| +--- org.jetbrains.compose.runtime:runtime:1.5.3
| | \--- androidx.compose.runtime:runtime:1.5.0 -> 1.5.4 (*)
| +--- org.jetbrains.compose.foundation:foundation:1.5.3
| | \--- androidx.compose.foundation:foundation:1.5.0 -> 1.5.4 (*)
| +--- org.jetbrains.compose.ui:ui:1.5.3
| | \--- androidx.compose.ui:ui:1.5.0 -> 1.5.4 (*)
I also only see a bunch of knm
files inside of org.jetbrains.compose.runtime:runtime
.
It's weird that the dependency does not show up in the pom, but I should really be looking at the .module file when using Gradle.
If anything, this would be a bug of gradle-maven-publish-plugin, if this is really a bug.
The Gradle Module Metadata of
compose-shimmer-android
is not aligned with the pom.The former declares a dependency on
org.jetbrains.compose.*
, the latter onandroidx.compose.*
.Since the Gradle Module Metadata has higher priority, Android apps are pulling in Jetbrains' version of Compose.