4 ms·
I'm curious to know what you like about gradle. A few months ago I had a chance to work with gradle and it looked to me like it was a step away from declarativ
by paperwork 13y ago
I'm curious to know what you like about gradle.
A few months ago I had a chance to work with gradle and it looked to me like it was a step away from declarative project descriptions, back to writing loops to iterate through files, etc. Possibly I was using it wrong, but I've heard great things about it and perhaps my expectations were just too high.
- zmmmmm 13y ago> a step away from declarative project descriptions Exactly why I like it. The delusion that build scripts are 100% declarative is one of those things that makes me hate tools like Ant etc. with a passion. Parts of build scripts can be declarative, but the ability to break out and put imperative logic in some section where you need it is crucial. And the nice thing about Groovy (which Gradle is based on) is that you can usually do it in a very declarative way (eg: files*.delete() rather than looping, etc.)
- spullara 13y agoWhen you run into the cases it is much better to write a plugin than to put imperative code into your build. Gradle builds are IMHO a huge step backwards for others trying to use someone else's build.
- zmmmmm 13y agoReally? You think someone will find it easier to go look at the source for my plugin rather than just a line of imperative code in my build script? I would agree it easily gets out of control, but I really don't think I would rather have to find and understand a whole plugin just to grok a one off piece of logic needed in the middle of a build script.
- spullara 13y agoGenerally, the imperative code isn't as flexible in different environments. For instance, if you look at the Gradle file for Gradle you'll find tons of stuff very specific to their actual computers they use to do the build. That is the opposite of what I want in a build file intended for third parties or even for medium teams.