Hello, what dependency do I need to get the multip...
# compose
r
Hello, what dependency do I need to get the multiplatform
@Preview
annotation
l
Hi ! It seems we can't preview composable of Compose MP in Intellij Idea, but in Jetbrains Fleet IDE you can. So what I'm used to do is to develop in Intellij Idea, and preview in Fleet.
r
Yeah i'm using fleet but the @Preview annotation cannot be resolved so i'm wondering what dependency do I need to add?
l
Wait, I'm looking in my own project
import org.jetbrains.compose.ui.tooling.preview.Preview
r
What dependency does that come from?
l
I don't know exactly. I look in my configurations files. According to me, it is already integrated in Compose MP project generated with KMP wizard. But I'm not sure
r
It isn't, because it cannot be resolved in my project
l
Strange 🤔 Did you generated it with Kotlin Multiplatform Wizard ?
r
Yeah, but that was about 2 years ago, long before this whole MP Preview became a thing
l
Maybe that's the cause.
r
The wizard only just adds dependencies and configurations, it's not doing anything special imo
l
Maybe you're right but I think it's worth trying again with the new Wizard version.
r
I found it, just in case anyone else also stumbles on this thread
compose.components.uiToolingPreview
l
Greet 🙂 Sorry for my mistake above
w
Probably the issue was that the project was generated 2 years ago. The common preview annotation was only added in recent Compose Multiplatform 1.6 IIRC.
👍 1