Hacker News new | ask | show | jobs
by Boxxed 2993 days ago
Personally, I think Gradle (and a whole lot of other software) needs to stop the whole convention-over-configuration idea. It makes things way too difficult to debug and learn from, all to save some one-time typing. Making everything implicit for the sake of simplicity is really just the opposite.
1 comments

> needs to stop the whole convention-over-configuration idea

Yup, and while we're at it, realize that the declarative approach doesn't work after the first basic uses and even though your hello world build file is simple, most people need customization. Scripting the build system should be its main feature and everything else as just shortcuts (to be fair, Gradle kinda does this w/ tasks, but doesn't make it simple to just drop into code).

This may be naive but doesn't GNU Make tick all these boxes in addition to being ubiquitous?
I like make, but no. Try out gradle; it really does support complex project structures in a much more natural way than make does or even can.

For example, have you ever wanted to break a large project up into subcomponents with build-time enforced dependency relationships? This is trivial with gradle but very hard/custom to do using make. gradle is aware at a domain modeling level about components of a project, their dependencies, and the implementation and interface artifacts they generate. I think this is really cool.

Their native support is still evolving, so it probably can't drop-in replace more complex native builds, but a few years ago I had it building a shared c++ codebase for macOS, android-linux, and iOS. I could test the core on macOS locally as its own project. I had google-test built locally and specified as a dependency (a sibling project) rather than prebuilt and plopped in a vendor directory. And the code was mostly free of ifdef android or macos etc. because I could not only enforce separation at a project level, but also easily provide a place for platform specific glue to live (in their own sibling projects). It was really cool and would have been a lot more work without gradle.

Not ubiquitous and missing shortcuts. How do you compile 5 JVM projects in different JVM languages, sharing different configured sets of potentially hundreds of libraries across the classpath and make sure there are no versioning conflicts? Shortcuts are required, they just don't need to hide everything.
I guess I'd compile them like anything else: using Make to invoke the compiler.

Checking versions can be accomplished by using awk or another tool to compare output from $compiler --version.

What am I missing?

Your makefile / build script would grow so complex so as to start reimplementing maven or gradle.
What if two things share a dependency?
Do you mean a conflicting dependency in one of my 5 projects? If so, it's on me to pay that technical debt and fix my own crap.

If the dependency doesn't conflict, then my package manager takes care of it.

GNU Make has a huge amount of convention over configuration. It has hundreds of built-in pattern rules!