Building Latex documents?

Do anyone have experience building Latex documents with Gradle?

I am working with a codebase using GNU Make and we want a new build system. We build all kinds of stuff with Make. We build Latex documents using latexmk is designed for Make as it can output a dependency file more or less like Gcc can. Gradle will somehow have to collect all those dependencies and use them. Has anyone done that?