If I understand correctly, the android related dep...
# compose-desktop
j
If I understand correctly, the android related dependencies are also pulled in as part of Compose Desktop build? If so, what's general approach used then to only depend on those for both?
j
Just apply the JetBrains plugin and use built in deps under
compose
accessor
j
Thanks @Javier, I'll try that
j
the only problem is where you want to add libraries which doesn't match with JetBrains one
for example 0.4.0 rc is based on beta 08
meanwhile google is still on 07
so you have to downgrade your jb compose version or looking for a snapshot in androidx repo which uses beta08
Hope after beta this error disappears, if not can be hard playing with third party libraries if one person is using Google one and another JetBrains one :/
a
In beta API is stable so as long as there's no ABI change (such as that introduced in beta07) compatibility shouldn't be a problem.
j
But I think it is a forced error
it checks the dependency and if it is not the same it fails
u
I hope compose web will also get Android dependencies soon
Or be included into compose desktop
a
@Javier I haven't seen that. How does the plugin know what version the dependency uses?
j
I don't know how it does, but for example, if I add the jetbrains dependencies in the app module, and I add there the google ui tooling dependency to use
Preview
, if google/jetbrains are not pointing to the same version, it fails
So I had to point google one to an androidx snapshot version
Maybe @jim can help here about this limitation and if it will be removed when Jetpack Compose is stable, or if both have to be stable before removing it
a
So your "dependency" means compose itself right? That is understandable, since that's essentially different versions of the same library. This shouldn't prevent you from using other libraries that use compose.
j
Tried this as a test, with a number of dependencies etc commented out (like tooling one), and was able to run Android app using that plugin and then adding these
Copy code
implementation(compose.foundation)
    implementation(compose.material)
    implementation(compose.ui)
Using
2.4.0-alpha01
still of navigation compose library and also current accompanist lib
j
Interesting 👀