Gradel loading error

When I go to open a new project my gradel doesn’t load, and I get this error.

A problem occurred configuring root project ‘client-master’.

Could not resolve all artifacts for configuration ‘:classpath’.
Could not resolve org.spongepowered:mixingradle:0.7-SNAPSHOT.
Required by:
project :
Could not resolve org.spongepowered:mixingradle:0.7-SNAPSHOT.
Unable to load Maven meta-data from http://repo.spongepowered.org/maven/org/spongepowered/mixingradle/0.7-SNAPSHOT/maven-metadata.xml.
Could not HEAD ‘http://repo.spongepowered.org/maven/org/spongepowered/mixingradle/0.7-SNAPSHOT/maven-metadata.xml’. Received status code 520 from server: Origin Error

What Java version are you using?

im getting the same exact error trying to build all my projects using spongepowered. on java 8. been getting it all day, and everyone i know has also been getting it, i heard that the serevrs were down or smthn, not sure.

the java I am using is jdk 1.8.0

Its a 520 error code which means its a server side error, however sometimes 5xx errors can be caused by the client from unpredicted things. But it does sound like a server error.

If you know what your doing you can still use traditional jdk compiling if needed

This is not error because of JDK, but it is a problem on Sponge side (not a problem actually), it seems that CloudFlare starts to deny all non-HTTPS requests (actually it redirects GETs but 520s HEADs), so Gradle can’t retrieve dependencies metas by HEADing them via HTTPS.

TL;DR if you use sponge plugin for gradle, update it to latest version (0.9.0), if not, update maven repo declaration in your build.gradle file with HTTPS protocol instead of HTTP (it should be https://repo.spongepowered.org/maven)

1 Like