olonho
07/01/2021, 9:26 AM0.5.0-build229
we implemented new experimental feature we’d like people to experiment with and help us to get improved. Namely basic non-interactive preview. To use, switch to 0.5.0-build229
and add implementation(compose.uiTooling)
into dependencies
block. Then install IDE plugin from https://plugins.jetbrains.com/plugin/16541-compose-multiplatform-ide-support/versions/alpha/125571. Add @Preview
annotation to argument-less @Composable
function and you’ll have gutter like shown below. Click it and function preview could be seen in “Desktop Preview” pane of IDEA. Thanks to @alexey.tsvetkov for getting that up and running! Known issues:
• put function with @Preview
to file where no main()
function exists, as it conflicts with run configuration. We plan to fix it soon.
• preview creates stale run configurations. We plan to fix it soon.
• preview pane doesn’t look eye candy
• running preview requires two clicks
• no automated re-running of preview on code change
Anyway, share your experience, and maybe help with improvements, code is at https://github.com/JetBrains/compose-jb/tree/master/idea-pluginColton Idle
07/01/2021, 2:20 PMColton Idle
07/01/2021, 2:55 PM/src/commonMain/kotlin/App.kt
block where I added uiTooling:
kotlin {
android()
jvm("desktop")
sourceSets {
named("commonMain") {
dependencies {
api(compose.runtime)
api(compose.foundation)
api(compose.material)
implementation(compose.uiTooling)
}
}
}
}
darkmoon_uk
07/02/2021, 3:57 AMandroidx.activity:activity-compose:1.4.0-alpha01
...while this version of activity-compose
is not resolvable.
Do we need to add a new repository?
I already have Google, Maven Central and JetBrains Compose Dev repo registered.olonho
07/02/2021, 7:46 AMolonho
07/02/2021, 10:41 AMColton Idle
07/02/2021, 1:34 PMolonho
07/02/2021, 1:51 PMColton Idle
07/02/2021, 1:53 PMolonho
07/02/2021, 1:53 PMColton Idle
07/02/2021, 1:59 PMErlinde
07/20/2021, 9:35 AMolonho
07/20/2021, 9:38 AMalexey.tsvetkov
07/20/2021, 12:43 PMErlinde
07/20/2021, 2:03 PMalexey.tsvetkov
07/20/2021, 4:15 PMErlinde
07/21/2021, 6:52 AMolonho
07/21/2021, 6:56 AMErlinde
07/21/2021, 7:09 AM