Gradle for LaTeX PDF Generation

Last night, I was Minecrafting with my daughter, and one of “those” thoughts smacked me between the eyes.

“I wonder if anyone has ever tried cooking a LaTeX document with gradle?” bubbled up from some nether-region that is obviously still obsessing over my recent gradle play.

I valiantly ignored the thought for an excruciatingly long time, and finally gave into the temptation to see “who’s done what” a few seconds later. Turns out there’s not much that comes up on a google search. What is there, however, bothers me for how much reliance is made on Ant, Java etc.

So, I parked my Minecraft toon, and experimented.  

My current understanding of gradle.

A couple of hours later, I had a working gradle script that takes my GitHub hosted resume LaTeX environment and produces the final PDF in nearly exactly the same manner as how I was doing it with Perl.

End result?  There’s no reliance on dubiously related plugins, and no stepping down into the guts of the application-stack to pull off arcane tricks.  The script is far smaller than the Perl it replaces, and pleases me for it’s terseness. Not that Perl is known for being verbose, mind.  Just that gradle packs a hell of a lot of build-love into a very small space:

I’m in a odd state over it.  I’m definitely pleased that my efforts to grok gradle have begun to pay off.  I’m delighted, even, at how small the final script is.

But I’m also sad.  Perl and I haven’t had a great time of it lately. This is yet another example where I now have sufficient skill in an alternate technology that it’s unlikely I’ll come back to Perl for this kind of glue.

It’s not you Perl. It’s me.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s