Does anyone know when Compose will be supported by...
# compose
i
Does anyone know when Compose will be supported by a non-canary (beta or stable) version of Android Studio? The requirement to use the canary version makes it very difficult to adopt in a large project with multiple teams. It would be nice to be able to test it out in one module without forcing everyone to use AS canary.
c
I think you can include Compose in a project and still use stable/beta. You just won't get the preview support in the IDE. Apparently studio has a rule that no canary features ship in beta until they're deemed stable (something along those lines)
a
Or ide support for telling you when you're trying to call a composable function from an invalid spot, but generally yes. Nothing will stop you from using it with the stable ide version
p
Although, the original question is interesting and intrigue me as well. When the compose will be supported by stable AS?
n
I think biggest problem not in AS itself. Compose required Canary AGP…
a
Nah, you can apply the compiler plugin and enable the IR backend manually and compose will be just as happy
n
@Adam Powell enabling IR not a problem, problem that Stable AGP can’t resolve
compose-compiler
it does not present in Google maven or central maven…
Copy code
> Could not resolve all files for configuration ':app:kotlin-extension'.
   > Could not find androidx.compose:compose-compiler:1.0.0-beta01.
     Searched in the following locations:
       - <https://dl.google.com/dl/android/maven2/androidx/compose/compose-compiler/1.0.0-beta01/compose-compiler-1.0.0-beta01.pom>
       - <https://jcenter.bintray.com/androidx/compose/compose-compiler/1.0.0-beta01/compose-compiler-1.0.0-beta01.pom>
     Required by:
         project :app
Changing AGP to Canary version solves the problem
c
@nonameden I think you have the wrong coordinates for the compiler Try using
implementation 'androidx.compose.compiler:compiler:1.0.0-beta01'
n
Could you please try before suggesting =)
Copy code
Try using implementation 'androidx.compose.compiler:compiler:1.0.0-beta01'
your statement does not contain
coordinates
as well, it still will look into jcenter and google maven repo
😂 1
so far using Jetbrains compose plugin with AndroidX Compose dependencies the only way to make it work on AGP stable...
t
@nonameden Came across your last message ^. Interested in understanding how you were able to make it work on AGP stable. May I ask what your setup looks like, which AGP stable version you tried with, etc? Thank you! 🙏🏼
n
Here Jetbrain Compose Github: https://github.com/jetbrains/compose-jb they have samples for Android, jsut copy setup in gradle and use dependencies in your module from androidx compose, works great no issues, only preview of composables does not exist in stable but everything else works nice and smooth
🙏🏼 1
c
It is more difficult to adopt compose desktop into an existing Android compose project though. The version numbers all end up conflicting (i.e. Gradle and agp)
n
hm, you just need plugin and thats all, all dependencies are goes from androidx, so there are no conflicts…