As a part of upgrading to milestone-5, we changed the way repositories are defined.
The problem we are facing with the new ivy {} repository notation is that dependencies are not being cached in the gradle cache. Repositories are currently defined as follows:
When a dependency artifact is available on the local filesystem, it usually doesn’t make sense to copy this file into the cache. The purpose of the cache is to keep a temporary copy of any artifacts that would be expensive to re-fetch: local files usually don’t meet this criteria and keeping an additional copy would be wasteful.
However, there are times when the filesystem is slow to access (eg a network share), and caching would be useful. Currently there is no mechanism for telling Gradle to cache the artifacts in these cases.
A way to instruct Gradle to cache files from a local repository is something we’d like to add. (And perhaps a way to instruct Gradle NOT to cache files from a remote repository)
Yep, I’d recommend using FileSystemResolver to ensure caching of ‘local’ filesystem artifacts. The only alternative I can think of at the moment is to use an HTTP server instead of a network share to deliver your artifacts, but this may not be practical for other reasons.
Although we plan to provide official support for your scenario, I don’t see it happening in the next Milestone.
This is a major flaw in my opinion. We have a network share as corporate repository. There are multiple reasons why it is a bad idea not to cache those files.
The network may be slow sometimes or for some people that are connected via VPN always - The network may be down, e. g. if you travel with your laptop - The server is under more load than necessary - The network is under more load than necessary - …
Please add this possibility. My current workaround is to have a local copy of the whole repository on my disk and have the repository location configurable.
No. There has been no further development on this, and we’re currently busy working on a lot of other features. If you’re interested in helping out to produce a solution, then please contact us on the Gradle developers list (http://www.gradle.org/development).