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

Tash

04/06/2022, 10:47 PM
Hi all! So far, Compose versions have been tied to Kotlin version/vice-versa until Kotlin makes compiler plugin APIs stable. Is this still true, or have there been any recent developments on this front? 🙏🏼
👍 2
j

jw

04/06/2022, 10:49 PM
Still true. For probably two or three years
🙏 2
🙏🏼 2
t

Tash

04/06/2022, 10:53 PM
Oop 😖, good to know. We were thinking of ways to decouple Compose from our project and keep all Compose things in a separately buildable project to allow for more independence, but wanted to know if there are any better ways of decoupling this for the “time being”
j

jw

04/06/2022, 11:19 PM
That is a good way since it provides you the flexibility of changing your main build Kotlin version at a normal rate rather than having to wait for Google and their inability to update and release at speed.
If only Compose didn't live in the AndroidX repo in AOSP things would be so much nicer
7
t

Tash

04/07/2022, 1:07 AM
True; faster iterations if it weren't on AOSP or some such, hmm. Thanks for confirming, will give that a shot.
There is one issue around inferred stability with non-compose + compose module “interop”, but there should be some ways to get around it https://issuetracker.google.com/issues/191068806
m

mcpiroman

04/07/2022, 11:17 AM
Currently compiler plugins work directly on compiler internals, so stabilizing the APIs would mean stopping evolution of the compiler and therefore kotlin. Alongside FIR there is a work on stable frontend API, but for backend part the current situation will probably last for a while. AFAIK not much can be done in this regard. But only if google would release Compose from AndroidX, that would sill help a lot 🙏
c

Colton Idle

04/07/2022, 1:39 PM
Wait. If I have a separate module with just composables (it's what I currently do) I can keep that kotlin version separate from my app module? I guess it makes sense I just didn't think of doing that. Seems like that should be straightforward?
3 Views