Thread
#compose
    v

    Vincent tiensi

    1 year ago
    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?
    jim

    jim

    1 year ago
    cc @Alexjlockwood
    a

    Alexjlockwood

    1 year ago
    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

    1 year ago
    Amazing, thank you for letting me know!
    a

    Alexjlockwood

    1 year ago
    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 😕
    jim

    jim

    1 year ago
    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.
    Yoel Gluschnaider

    Yoel Gluschnaider

    11 months ago
    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

    11 months ago
    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