What happens when services.gradle.org does down?

At the moment https://services.gradle.org/distributions/ is unreachable which means that the wrapper can’t download gradle. Is there some sort of mirror / failover mechanism built into the wrapper and if not, should we write one?

We are waiting to hear back from our hosting provider as to what is going on. All we know is that it’s the equivalent of a data centre outage and we don’t have redundancy for this issue.

This is the longest outage we’ve had in 5 years. If you require absolute guarantees on availability, then running your own internal proxy would be the way to go.

I’ll post back when I have more information on the outage.

Cheers Luke.

How would you feel about the ability to specify a failover / mirror etc within the wrapper config itself, much like the mavenCentral / Local / url paradigm?

My use case is that I’m using Vagrant and Ansible to automatically provision an EC2 instance, then using git to check out the source code, and then gradle to run a Java application to migrate data from one db to another. All my dependencies are either mirrored through a Nexus instance (itself provisioned by Vagrant and Ansible on EC2) or stored in S3 - the only link in the chain I can’t control at the moment is where the gradle wrapper gets gradle from. I could circumvent this by having a caching proxy, or just installing gradle using ansible - and whilst I realise that the wrapper is just a convenient shortcut to the latter, I reckon the wrapper might be the most sensible place to cope with this situation.


Just done a bit of digging and I think I can achieve my redundancy by just setting the distributionUrl property in gradle-wrapper.properties although not sure what’s gonna happen if confgureWrapperTaskName runs as it’ll still end up throwing an exception. I’ll give it a go and see what happens.