Issue
For some reason my offshore team is not able to Download the artifacts(Dependencies) from my clients Artifactory which is our Organizations dependency repository."Refresh Dependencies" triggers nothing and gives TIME OUT EXCEPTION. I see the that my "Gradle Dependencies" are downloaded to the location "D:/C813507/Gradle/gradle-1.11/bin/caches/modules-2/files-2.1/". Can i zip this folder and send over to them ? How do they implement something in gradle that points to their local directory. My build gradle has the following line. How to point the URL to local directory in Windows OS
repositories {
maven {
url 'http://artifactory.myorg.com:8081/artifactory/plugins-release'
}
}
Solution
If you can't give access to your offshore team, you can copy all dependencies jar that needed to a single directory, and then use flatDir
repository.
repositories {
flatDir {
dirs 'D:/path/to/local/directory'
}
}
dependencies {
compile name: 'name-of-jar'
}
Another way without using flatDir
repository is:
dependencies {
compile files('/path/to/dir/something_local.jar')
}
Answered By - dieend
Answer Checked By - Timothy Miller (JavaFixing Admin)