My project has dependencies to a maven repo which is mounted to my file system and referenced using a file URL:
repositories {
maven {
url 'file:/Volumes/Repos/maven.repo/'
}
mavenCentral()
}
When I build the project, the dependencies from mavenCentral are cached locally, which allows me to work offline after I built the project once before.
Unfortunately, the dependencies from the file-based repo are not cached. So my build breaks when I try to run it at home where “/Volumes/Repos” is not mounted.
Can I force gradle to cache dependencies from my file-based repo?
I would like to do something like that:
repositories {
maven {
url 'file:/Volumes/Repos/maven.repo/'
useCache true
}
mavenCentral()
}