Hacker News new | ask | show | jobs
by 7e 1011 days ago
I hope the Bazel plugin works with this. And I hope there is at least one Jetbrains IDE where I can work on C++, Python and Rust at the same time.
2 comments

I wish Jetbrains and Google could work towards replacing Gradle for Android with Bazel. This would mean much more alignment in Android Studio/Jetbrains IDEs and ASOP itself is built with Bazel these days so eventually having both ASOP and app projects built with the same build system could yield benefits also.
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.

The problem isn't Gradle itself which I am a huge fan of but more so the existing legacy Android plugins which have either stagnated or slowly degraded.

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.

Thanks for the comment, I am also baffled why people have so much trouble understanding gradle’s model.

I am not that well versed in bazel, but doesn’t it sorta require a monorepo like structure?

Talking about bazel (or buck, etc.), I wish there was a JetBrains IDE that supports all languages.
That would be “Fleet” (https://www.jetbrains.com/fleet/)., which is still in early preview.

I tried it out 3 or 4 months ago, and I didn’t find it useful, nor familiar - kind of feels like a VSCode wannabe.

It was disappointing to see, as I am really tired of running multiple IDEs to work on mixed language projects.

It sounds like you just want Intellij Ultimate. Fleet is explicitly aiming to be VS Code like while Ultimate is just regular Intellij with access to most language plug-ins.
It was disappointing to see, as I am really tired of running multiple IDEs to work on mixed language projects.

mixed language projects are the __norm__, not the exception. I get most often bitten by this when I have both C++ and Python IntelliJ projects configured in one tree, and it starts complaining about project name clashes.

complete waste of time, and i wish they would fix outstanding bugs, especially small cosmetic ones in the existing products, which have the lowest risk of regressions. case in point https://youtrack.jetbrains.com/issue/DBE-11296 ... which after three years elicted the response "We have no plans to implement this feature in the near future."

reminds me of this https://www.youtube.com/watch?v=CLW7r4o2_Ow

Is there anything IntelliJ Ultimate is missing in your opinion? I use it with quite a few different languages (JS, TS, Java, Kotlin, Dart, Go, Rust, Erlang, C) and it works really well (except maybe the last two but I very rarely need them).
C++.