I'd still want to use Gradle (or Maven) though, they will automatically download toolchain and library dependencies (even indirect ones). That reduces download instructions for wannabee contributors to
install $SCM, checkout the source tree, run ./gradlew
which is pretty easy on them and allows them to concentrate on whatever aspect they're interested in, instead of having to deal with toolchain installation (which gets old quickly).
Oh, also
<condition property="args.input" value="${dita.input.dirname}${file.separator}${dita.input}">
<not>
<isset property="args.input"/>
</not>
</condition>
is just too much vs. Gradle's
if (args.input == null) {
args.input = "${dita.input.dirname}${file.separator}${dita.input}"
}
or the even more compact
args.input = args.input ?: "${dita.input.dirname}${file.separator}${dita.input}"
Not that I'm suggesting that all ant stuff should be thrown overboard. After all, it's working - not so well for the Maven/Gradle ecosystem, but fully adequate for command-line usage.
I actually investigated the Gradle & DITA-OT combination some time ago. However, if I recall correctly, I threw away what I had because I didn't really feel I was gaining anything by using Gradle
and I couldn't really live with Gradle's mutable properties (as opposed to Ant's immutable ones).
Thanks for the pointers, I'll be investigating more over the weekend.I actually investigated the Gradle & DITA-OT combination some time ago. However, if I recall correctly, I threw away what I had because I didn't really feel I was gaining anything by using Gradle
Gradle isn't giving you much if all you want is generating documentation.
It will shine if you have multiple deliverables, have a build process that's so slow that you don't want to rebuild what doesn't need to, or have a complicated dependency setup.
dita-ot doesn't seem to need any of that. Well, maybe some day FOP will start needing dependencies.
One thing that dita-ot could gain from Gradle to change FOP version at the drop of a hat. That would allow experimenting with different versions of FOP with very little effort - just change the version number in the build.gradle and let Gradle download whatever different dependencies the other FOP version may need.
For including dita-ot into another builds, Gradle can simply call the ant buildfile.
More hoops to jump than strictly necessary I'd expect, but at least it should work :-)
and I couldn't really live with Gradle's mutable properties (as opposed to Ant's immutable ones).
Gradle properties are mutable only during phase 1, collecting information.
During the actual builds, properties can't be mutated anymore.
Though I'm wondering what's so bad about mutable properties. Okay they're somewhat cleaner, but unless you do real programming (and ant isn't suitable or designed for that), I'm not seeing any problems from that area - am I missing something?
I agree completely with regard to Gradle's benefits, and I didn't mean to discount Gradle at all — I simply meant to say that for that particular job (DITA-OT-related but not building or packaging DITA-OT itself) I was considering it for, it didn't offer any benefit over Ant.
I'm afraid it was so long ago that I toyed with Gradle that I don't remember the particular problem I had back then, but it may have had something to do with passing properties on the command line or something similar. It's entirely possible I just didn't figure out the right way to do it back then (or things may've changed in the Gradle world), but I just vaguely remember being frustrated about not being able to count on properties retaining the value I had given them. :)