|
|
|
|
|
by kaba0
1011 days ago
|
|
What’s the problem with Gradle? It is one of the few extensible, cross-language build systems that actually has most necessary features for the task, and is correct. Android just has some absolutely mindblowingly insane dependency graph and long-running steps in their build process, making even gradle sweat buckets. Without a significant re-architecture, Bazel wouldn’t fair any better, while a significant re-architecture could just as well help Gradle. |
|
Moving to Bazel would be good for aligning everything. As previously mentioned ASOP is built with Bazel, Bazel already has great support for building Android apps (and works much better with NDK: https://bazel.build/docs/android-ndk).
Gradle while I do like it I have come to realise is a drastically more complicated (and magic) build system than Bazel. I say this as someone that can do "anything" in Gradle by either developing custom plugins or dropping hacks into buildSrc.
I think part of the reason why Android builds don't get better is people don't want to even try deal with Gradle because of the comprehensibility cliff, i.e there is too much distance between "I can copy and paste and it works" and "I actually understood what I copied and pasted".
It's hard to say exactly what the key problems are with comprehension are but despite years of trying to help others understand Gradle I gave up and just handled all the build issues myself.
Bazel has been a lot easier on the uptake, it's not perfect and still takes a bunch of upfront "you need to understand the difference between rules, repository rules, macros etc" but there is less fundamental topics to cover and less magic if you aren't using external rulesets.