https://kotlinlang.org logo
#compose
Title
# compose
a

alorma

01/28/2021, 7:48 PM
• IS anyone else getting:
Copy code
Duplicate class androidx.compose.animation.AlignmentBasedSizeAnimation found in modules animation-1.0.0-alpha11-runtime (androidx.compose.animation:animation:1.0.0-alpha11) and animation-debug-runtime (org.jetbrains.compose.animation:animation-android-debug:0.3.0-build141)
????
j

jim

01/28/2021, 7:51 PM
Jetbrains publishes the same binaries but with different version numbers, so anything in the Compose/Google maven repository should also be available via the Jetbrains repository under a different artifact name/version.
a

alorma

01/28/2021, 7:55 PM
uhmmm
I',m using a MPP library, so i should use all components from jetbrains?
j

jim

01/28/2021, 7:56 PM
all of your Compose dependencies should be the ones published by Jetbrains, yes. Jetbrains does releases more frequently than we do, so they already have more up-to-date binaries.
a

alorma

01/28/2021, 7:56 PM
uhmmm
how can i setup it on a simple android project, then? :S
j

jim

01/28/2021, 7:57 PM
on a simple android non-mpp project? Or a simple android project using MPP?
a

alorma

01/28/2021, 7:58 PM
second one
j

jim

01/28/2021, 7:58 PM
Have you seen: https://github.com/JetBrains/compose-jb/tree/master/examples/imageviewer It has an example MPP project that builds for both Desktop and Android.
a

alorma

01/28/2021, 8:09 PM
In fact, it's a simple android, using google libs, with one dependency that is mpp
(m own dep)
j

jim

01/28/2021, 8:15 PM
In fact, it's a simple android, using google libs, with one dependency that is mpp
Sorry, I'm not sure I understand, can you elaborate a bit more?
a

alorma

01/28/2021, 8:43 PM
Android app that uses google compose dependencies. It uses a library that is built with jetbrain compose dependencies
j

jim

01/28/2021, 8:53 PM
Yeah, that is tricky at the moment, especially since the jetbrains and google builds are slightly time dilated. I think there is a way to force gradle to satisfy some dependencies using a different artifact, which may work for you (you could force android to use the android-variants published by jetbrains, or force the mpp library to consume the google binaries), but it would be a little hacky in the short term.  We are working on a better long-term solution, but that is probably at least six months out.
a

alorma

01/28/2021, 9:36 PM
Ouch
as it's a library for developers, i can wait for it