How are devs with multiplatform Compose projects d...
# compose-desktop
d
How are devs with multiplatform Compose projects dealing with the current lack of
@Preview
. I'm a bit confused why there isn't more noise regarding it, because it means one of: a) nobody's using JB Compose to even notice (don't want to believe this one) or b) there's a workaround that I've missed or c) Devs are generally more patient than me and just quietly waiting until it works again ☺️?
j
Preview is supported in desktop
d
@Javier thanks but that's not quite what I meant... Android preview doesn't work from the JB Compose (Multiplatform) artifact and hasn't done for several releases now. While there's a workaround for this, the workaround then prevents you from using Desktop preview. In summary, for Multiplatform development purposes, Preview is completely broken and I'm curious why we haven't been seeing more noise about that.
j
I am using preview in both, desktop and android in multiplatform, the only problem I have is I can’t have preview composables in common so I have to have one in each source set, jvmMain and androidMain
d
Well that's really good news to me, if you confirm that's working, because I haven't been able to make it work.
j
I think you only need to add the google preview dependencies for the android source set and the jetbrains one for the jvm source set
d
When I did that I got duplicate class definition errors.
I'll revisit it, now that you've said it can work.
Thanks 👍
The workaround in that thread
d
I know the
-beta09
workaround for Android; the issue was I couldn't configure both
-beta09
and Desktop simutaneously without getting Duplicate Class errors, even when configuring the only top-level projects and not a common module 🤔
I must have missed something... trying again.
j
Not sure about beta09, I am using jetbrains alphas and google stables