You can use mavenCentral() to download jars and have them added to your classpath automatically. But what if you need to download a tarball and compile a C library to add to LD_LIBRARY_PATH in addition to the jar that is needed to compile and run?
Using Gradle, what do you think would be the best approach to incorporate this type of 3rd-party software into your build?
I don't think we can accomplish this declaratively, so my naive approach would be to create a task that downloads and extracts the tarball, compiles the software, and copies the libraries to build/lib or something, and make javaCompile depend upon it. Is there a better way? Would it be wise to put the task and libraries in buildSrc instead?
Our goals are to avoid redistributing software and to make it easier to use our software.
Our first example is HDF Group's HDF5 tarball. If you use this software, what was your approach?