What’s the best way to have a Gradle build depend on a file downloaded from a plain http URL? This is a file that isn’t part of an Ivy/Maven repository, though it does have a version number in its path and can be cached.
(I’ve tried using de.undercouch.download as well as invoking the ant get task, but neither of those caches the downloaded file across builds.)
I think what you need to do is specify this URL as a repository and specify a normal dependency. I haven’t done this, but from what I just read, it seems like if you specify this as a “maven” repository, even though it doesn’t have a POM descriptor, it should find the jar.
here is a good answer that explains how to define the pattern of the ivy repository
the gradle-download-task plugin works well, and you can manually add the caching mechanism by copy-pasting that code. Most probably, soon it will include the caching mechanism by default