https://kotlinlang.org logo
v

Vincent tiensi

12/01/2020, 5:19 AM
I did a quick search on bazel in this chat but nothing showed up, can anyone share their experience working with jetpack compose in bazel?
👍 2
j

jim

12/01/2020, 1:06 PM
cc @Alexjlockwood
a

Alexjlockwood

12/03/2020, 3:16 AM
right now it’s not 100% supported… the issues are mostly with the current state of
rules_kotlin
, specifically the inability to specify per-target compiler flags to kotlin rules (i.e. with compose you need to be able to pass the
-Xuse-ir
compiler flag to kotlin targets, but right now you can only do so on all targets, not individual targets… which may or may not be an issue for you). there’s quite a long discussion about this here: https://github.com/bazelbuild/rules_kotlin/issues/396 right now it seems like the maintainers of
rules_kotlin
are hesitant towards supporting this…. but i also feel like it will eventually kind of need to happen, given the huge demand to support compose in android moving forward. TLDR there are still a lot of open questions on the other hand, if you are building with facebook’s Buck build system, i’ve managed to get that working 100% with compose w/o any issues
v

Vincent tiensi

12/03/2020, 3:16 AM
Amazing, thank you for letting me know!
a

Alexjlockwood

12/03/2020, 3:18 AM
yeah, if you want feel free to chime in to these conversations in
rules_kotlin
as well. i think our company was the first to bring these issues up… i imagine more will follow and they will eventually be forced to prioritize this. but as of right now it doesn’t seem like there is a huge hurry on their end. we’ve been considering patching
rules_kotlin
in the mean time 😕
j

jim

12/03/2020, 3:27 AM
The only question is if the IR backend will become the default before that rule gets added. The IR backend may become the default as early as 1.5, which may be only a few months away.
y

Yoel Gluschnaider

10/04/2021, 12:02 PM
Hi there @Alexjlockwood Thank you so much for this 😄 I was wandering if you had any experience with the Preview feature using Bazel.
a

Alexjlockwood

10/26/2021, 9:32 PM
sorry for the delay. we are still figuring that out… we’re gonna start looking into it more in a few weeks @Yoel Gluschnaider. we definitely want to get that working though
👍 1
🙏 1
5 Views