Gradle build doesn't download dependencies

System caches the dependent jars so it won't be downloaded again and again.

If your goal is to just see the downloads of the dependencies then you can force it to redownload.

Remove any dependency caches stored locally [1]

$ rm -rf ~/.gradle/caches/

Then restart your build

$ gradlew clean build

You could also force a dependency update with [2]

$ gradlew --refresh-dependencies

[1]https://docs.gradle.org/current/userguide/dependency_management.html#sec:dependency_cache
[2]https://docs.gradle.org/current/userguide/dependency_management.html#sub:cache_refresh


The solution that helped in my case:

File -> Invalidate Caches/Restart...

If your project builds successfully some time it may be gradle download problem with a current proxy. Gradle has it's own dependency management system similar to maven. I think parts of the gradle publish plugin are backed by maven in some way (not verified). Regardless you shouldn't have to worry about that level of depth, gradle will handle it. Your problem is setting up the proxy. You just need to set some variables in $projectDir/gradle.properties, for example:

#http proxy setup
systemProp.http.proxyHost=www.somehost.org
systemProp.http.proxyPort=8080
systemProp.http.proxyUser=userid
systemProp.http.proxyPassword=password
systemProp.http.nonProxyHosts=*.nonproxyrepos.com|localhost

This can be used to download dependencies without proxy. If you want to use a proxy for you can use the code as below instead of above code.

systemProp.https.proxyPort=3128
systemProp.http.proxyHost=192.168.16.2
systemProp.https.proxyHost=192.168.16.2
systemProp.http.proxyPort=3128

Proxy port and host can be changed as you want.