I know little about gradle and have only just started exploring it, so this is just a question out of curiosity.
It’s supposedly a language agnostic dependency manager and builder, yet it seems to have only found its niche in Java. C/C++ projects could definitely do with dependency resolution…
Gradle is pretty awful actually, I’ve had to deal with it for years when I was writing Java. It’s pretty much the #1 reason I’ve stopped doing anything Java related.
Meson is the well designed option for C family languages. It also has support for Java, Rust, Swift, and a couple other languages. C is the most well supported though I think.
It also has a built-in dependency downloader that respects the system installed packages (and therefore distro packagers).
Gradle is so insanely over-engineered that it can do almost anything, yet so fragile that it can take weeks of bashing your head against the wall to get your build scripts working if you’re doing anything remotely complicated with your setup (or even just upgrading Gradle versions). Everything is so finicky that even if you do things exactly as the documentation says, you’ll still have to finagle things around nine times out of ten to get it to compile.
The user guide is longer than some novels.
Gradle upgrades are dead simple… like yeah I get a bunch of the other criticisms of Gradle, but they mark things as deprecated two full major versions ahead and then slowly phase them out. Upgrades are a single command.
I haven’t really encountered the issues others are having and I’m guessing a lot of them occurred before Gradle’s switch to kotlin.
Edit: or the issues are actually from android build tool and not actually Gradle
Upgrades are a single command.
That’s a weird flex.
I’ve not used anything in 20 years that didn’t upgrade with a single command – in a cron file because it’s been so well-proved and has such a painless back out that you don’t fear the so-far-2-in-27-years cases where you need to use that backout.
“Upgrades are a single command” is so “I can tie my shoes” basic that I’m embarrassed for those who cannot.
Only java developers can accept how slow gradle is.
Programming languages come with their own niches, tools, culture, and history. Gradle has lots of verbosity, complexity, and so on. It’s a build system and a dependency manager in one. Other languages separate these duties.
A cultural preference for tools written in specific languages or available for specific platforms exists as well. Lots of C/C++ programmers dislike everything Java. They will cite performance and philosophy. They ask why should they install and manage JVM versions and installs for a task they can do with a make file, a shell script, and Conan/vcpkg.
Not even all Java folks use gradle. maven and ant ant are still around and I’ve seen someone write Java build tasks using rake.
As someone who used gradle then didn’t for a few years and looked back it, damn did they absolutely butcher the whole thing, not to mention now with the dual kotlin/groovy stuff the documentation is incomprehensible and achieving something that was easy as fuck in groovy like copying some files is a nightmare in kotlin.
The parallel builds seems to be almost entirely gone, de dependency management got an even weirder file format. I have no idea what they are doing
no please don’t. Whenever I try to install something old and I realise it’s written in java I just give up after days of trying or end up with like 4 java versions installed and different dependencies need different versions.
I see gradle written while doing so, thus I associate it with HELL.
In world with alternatives, it may never thrive.
For instance, Bazel exists. Go see.
Here are a couple of reasons:
- C and C++ projects often predate Gradle by decades they will not change their build system without a compelling reason.
- Gradle is written in Java and requires a Java Runtime.
- At least for C++, CMake has pretty much become the standard build tool.
- Dependency resolution on Linux was ‘solved’ by relying on the distribution. Today, there also exist package managers for C and C++ like vcpkg or conan and they also integrate with CMake.
Gradle is written in Java and requires a Java Runtime.
Not an issue.
Cmake tends to be the upgrade path for sure, gradle is… hideous, i have having to use it for android.
Are vcpkg and conan widespread in your experience? Mine has still been majorly “works on my machine with unnamed debian version and unrestricted library version”, which still breaks like 90% of the time.
What you do is you put “compatible with Debian 2024 and Ubuntu 202502 and rocky8 over its entire lifetime” because you tested it and you don’t rinkydink with bizarre custom shit because it makes a really frail platform that causes everyone headaches.
This “you have to use this library from this particular week’s release” is very CPAN; and not in a good way.
I worked on a couple commercial C++ applications that used vcpkg. It’s not as convenient as nuget, cargo or npm but it think it is a massive improvement over manually hunting for dependencies.
I know a bunch of larger C++ apps that use vcpkg for cross-platform (Windows/macOS/Linux) builds of their dependencies and it seems to work pretty well
As an Android and Java engineer.
No, let them have CMAKE until they learn RustLang and use Cargo.
You don’t want them invading the Android and Java space? 😄
deleted by creator