I built my own game engine from the ground up for this project and the hardest problem I have had to solve this entire project remains "how do you build anything at all for Android"
It's occasionally just really shocking that Google still hasn't faced just how bad the developer experience targeting the NDK is. Apple is actively hostile to third party devs yet they were not able to create something as hostile as the Android build system(s) became by accident
Also as an interesting piece of trivia, I am actually targeting a non-phone hardware platform which chose to use Android as its base but which does not run conventional Android apps and does not, in fact, appear to support Java at all
But still uses the Android/Java build system
The funny part about it is that Android SDK/NDK build system isn't what's used by Android itself. Android itself is busy replacing a far superior build system to the one they make app developers use with a better one, after previously going through a past replacement like that.
Whenever I ask why a particular weird piece of Google tooling is the way it is, the answer seems to be "well internally they use Blaze, but that's internal, so they made an external OSS tool which implements a subset of Blaze. ... another one"
gradle isn't the kind of thing they'd build though. They just made a plugin for it. The Android build system itself may not be as wonderful as Bazel would have been but it's actually the nicest build system that I've used overall. gradle could actually be the worst.
I barely deal with gradle and it makes me unhappy. It's ridiculously complex and every 6 months it has become completely different. I don't like Groovy either, but I don't want to learn how Kotlin gradle works since it's a waste of space in my brain.
Any build system using a programming language instead of being entirely declarative with a simple DSL and rarely used escape hatches for cases you need more just makes me sad. It's all too complicated. Android.bp I actually like. The internal http://Android.mk was fine too.
I want to some degree a programming language, but the thing that just absolutely kills me about Gradle is that the vast majority of errors are completely silent.
I really like having a declarative DSL with basic conditionals, etc. where if really needed there is some escape hatch with an actual programming language like Go or whatever rather than dealing with the horrifying build system programming languages.