https://kotlinlang.org logo
#compose
Title
# compose
m

Marcello Galhardo

02/25/2021, 12:58 PM
Hi! Now that we have Compose Beta, do we have a date for Android Studio 4.2 to reach Stable*? I wanted to migrate our "design system prototype" to Compose Beta without customizations from my side (gradle plugin) but I did not want to break other developers using Android Studio 4.1 stable. Thank you.
j

Javier

02/25/2021, 12:59 PM
AS 4.2 is beta
The only way to use compose in stable AS versions is using Jetbrains Gradle plugin
z

zsperske

02/25/2021, 3:05 PM
do you have any more details on that?
j
z

zsperske

02/25/2021, 3:14 PM
thanks!
🙂 1
m

Marcello Galhardo

02/25/2021, 3:34 PM
@Javier sorry, I meant 4.2 Beta to Stable. I typed wrong. But thank you for the type with JB Compose.
j

Javier

02/25/2021, 3:35 PM
4.2 doesnt support Compose without JB Gradle plugin
m

Marcello Galhardo

02/25/2021, 3:44 PM
@Javier it does not support the general tooling (preview, etc) but, at this moment, you can use and build Compose applications with Android Studio 4.2 - only Android Studio 4.1 is limited to Compose version 1.0.0-alpha03. I do actively use AS 4.2 as I feel it is way more stable for coding if compared to AF.
androidx.compose:compose-compiler
 has been refactored to 
androidx.compose.compiler:compiler
. This is the first release in the new group.
j

Javier

02/25/2021, 3:44 PM
Yeah, you can't use preview in common or jvm modules
A workaround can be using a simple
main
function which run a desktop app with the screen you are editing for example
sample:
Copy code
fun main = Window {
     SomeScreen()
}

@Composable
fun SomeScreen() {
    ...
}
3 Views