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' } }
Gradle's local repository folder is: $USER_HOME/. gradle/caches/modules-2/files-2.1.
The location for storing modules is called a repository. By specifying the repositories for a project, Gradle can find and retrieve modules. Repositories can be in different forms, such as a local directory or a remote repository.
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') }
Instead of configuring flatDir
repository, you can declare a local maven
repository as following:
repositories { maven { url 'file://D:/path/to/local/directory' } }
As @Peter Niederwieser mentioned, flatDir
repository doesn't support transitive dependency resolution. maven
local repository does.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With