How to switch off download gradle distribution?

For gradle wrapper, i have placed the gradle distribution in local directory with relative path configuration and right now want to switch off the downloading while running ‘gradlew build’, how to switch OFF it? any advice? Thanks

You can choose to not use the gradle wrapper, by just running ‘gradle’ from the ‘gradleX.x/bin’ directory of your downloaded zip.

Or, you could set the gradle wrapper url property to download from your local file location.

E.g. assume that you downloaded to ‘C:\Users\johndoe\downloads’, then modify ‘gradle/wrapper/’:


Is this an IDE issue, where your project is configured to use the gradle wrapper by default?

dear kevin, thanks for your prompt advice, but actually it is going like this as you mentioned refer to some local location. But why gradle needs to download the distribution even if a local distribution provided? And it would take time and disk space to download and duplicate storage.

You should be able to see the gradle zip contents within your user home directory. Somewhere under ‘.gradle/dists/wrapper’. Once there, it should not download this again. Is this not the case?

Here is my configuration: archiveBase = ‘PROJECT’

archivePath = ‘build/wrapper/archive’

distributionBase = ‘PROJECT’

distributionPath = ‘build/wrapper/dist’

distributionUrl = uri(’./tools/gradle/’)

it will copy the zip file to distribution path only once, i see, but why can’t i switch off it? I mean why not extract the gradle binary files from original zip file (distribution URL referring to) and without the copy step. Anyway, it is not a big issue but could be optimized in my opinion even while it integrates with some CI tools on UNIX server.