My android only project is now android and desktop...
# compose-desktop
c
My android only project is now android and desktop! I'm still using these dependencies:
implementation("androidx.compose.runtime:runtime-livedata:1.0.0-beta07")
implementation("androidx.compose.ui:ui-viewbinding:1.0.0-beta07")
in my android app module but a few threads above it was recommended to not mix and match JB compose and Google compose. What dep should I use instead of the above? I will say that I'm using those above and everything seems to compile and run just fine.
j
I doubt JB is providing those libraries in the same way there is no UI tooling lib yet. So I think you will have to use the Google libs mixed with JB libs
i
not mix and match JB compose and Google compose
What I meant here is not to use
androidx
versions of core libraries that exists in JB repository.
livedata
and
viewbinding
are not core libraries (they depend on compose)
ui-util
is a core libray (compose depends on it) If JB repository doesn't have some libraries then the only way is to use
androidx
version. API is mostly stable (but not entirely), so in most cases everything should be fine if we use the close released versions (0.4.0 and 1.0.0-beta07) . P.S.1 we don't plan to publish libraries like
livedata
or
viewbinding
P.S.2 we plan to align version of core artifacts with
androidx
version after CfD 1.0, so there will be no API inconstancies.
c
Oh! Thanks @Igor Demin Is there an easy way to know what are compose artifacts? Or is there a list of available artifacts I can search?
j
@Igor Demin the error about using non compatible version (i.e. androidx using 07 and jb using 08) will be removed when compose is stable?
i
You mean non-compatible version of Kotlin? It depends on core compose developers from Google. But if this error will stay - it will be saying about the real CfD version.
Is there an easy way to know what are compose artifacts
Here the list of core libraries. If third-party androidx library depends on
androidx.compose
, the dependency will be automatically replaced by
org.jetbrains.compose
And just now I realized, that if you even use a core androidx library like
ui-util:1.0.0-beta07
, the JB compose Gradle plugin will always pick
ui-util:0.4.0
🙂
c
JB compose Gradle plugin will always peek 
ui-util:0.4.0
 
will always "pick", right? Or is "peek" some gradle terminology?
🙏 1
i
right 😄
🦜 1
c
Thanks Igor. All of this is really starting to make sense to me. I might even be able to help answer questions in #compose-desktop instead of just asking them. 😅
🎉 1
j
@Igor Demin not about Kotlin (only) it is more about if I use a jb version which has a newer beta version under the hood, then if I add a library which is using the previous beta version, it fails
i
Not sure what error you are talking about 🙂 Have you the text of the error?
☝️ 1
Probably this error
Copy code
You are using an outdated version of Compose Runtime that is not compatible with the version of the Compose Compiler plugin you have installed
That is also depends on Google guys, because you can catch this error even if you don't use
JB compose
, and just use different versions of
androidx compose
(for example, when you use the latest compose and depended library an older compose). But when JB will align versions with androidx, this error will be happening as often as for androidx 🙂
🙂 2
j
Yeah I think it is, I will try to reproduce in next days