Hacker News new | ask | show | jobs
by rpodraza 963 days ago
Gradle is fine once you understand how it works. Admittedly, it takes a bit of time to get used to, but it's very customizable.
4 comments

Gradle is cancer. I would love to recommend an alternative that enjoys the admirable quality of "not being cancer", but I am instead left not developing on Android out of lack of any coherent alternatives (and especially examples or tuts showing how to make use of them if they do exist hidden out in the wild there somewhere)

EDIT: just to add some background, I am staunchly against any development platform that requires a developer to build a ridiculously complicated nest of file structures, libraries, bindings, etc out of dozens if not hundreds of disparate and usually incompatible projects yoinked from the internet that further makes broad and undocumented assumptions about the dev machine you're trying to install this all on.

Also bear in mind that package managers by themselves often make this process worse instead of better because they then proceed to proliferate into an entirely different level of the trashfire hierarchy. Get node/npm even though you're not coding in Javascript, then still have to get chocolaty or flatpack or fall back to trying to insulate everything into a docker container or use pip to install python packages but then drag out the venv when different projects want different versions of the packages and then further drag out conda when they want different versions of python as well.

Too much of the environment assumes that the developer is already steeped in all of the thousands of compromises existing developers have slowly gotten accustomed to over years of yielding and putting up with it. Another day, another fault line along which to fragment every tool you need just to create "hello world".

This is a good description of my problems with Python when it was first introduced to me. Although, "hello world" didn't require installation of anything (Python has been pre-installed in Ubuntu for a while now), the mess and confusion and incompatibilities and irreproducibilities were quickly run up against and each "solution" was more opaque and flippantly suggested that I couldn't figured that programming wasn't for me. I'm glad I persisted past it. The juxtaposition between hearing that "Python is so easy and wonderful" and my experience made me look for answers. And the answer, it seems, is that people don't care. The vast majority just keep installing everything until it works and don't mind that they initially don't know what's going on (and oftentimes never find out). The few that do mind are on opposite edges of a canyon of experience.

Thank you for letting me rant over this.

Gradle might be fine compared to other Java build tools, but when stepping outside the Java world it feels like a leftover from the 90's... and that's the same for pretty much anything else related to Android development, which is curious because Android didn't even exist yet in the 90's ;)
Which build tool is better? The language-specific ones are pretty much useless for a more involved build that is cross-platform, let alone uses multiple languages.

Gradle is generic, which does increase its surface area, but there is not many alternatives that are also fast and correct: there is bazel, and a new thing I very like: mill. But not much else is there.

Gradle is almost a language itself. I have never seen a project where teams didnt run into gradle hell and spend hours on every lib update to fix gradle issues. Its just too damn complex and most of the time nobody is really an expert in it.
Yes I believe Gradle is a DSL based on the Groovy programming language
Or more recently on Kotlin script (newer Gradle files often have s .it's suffix to indicate that)
Right. The thing is that how it works changes all the time. A construct you used in gradle file suddenly gets deprecated or outright not working with new gradle versions. I heard those things happen during minor version upgrades as well. No thanks! Luckily I don't work on android apps.