Gradle 2.1 in infinite loop when using a non-authentication PROXY to download dependencies

I’m having issues using Gradle through my proxy at work. It gets stuck in an infinite loop while downloading dependencies. I ran this exact same Gradle build at home (without the proxy) and it worked flawlessly.

The proxy I must go through requires no username or password. Here is the snippet from my gradle.properties file:

systemProp.http.proxyHost=internet.proxy.mycompany.com
systemProp.http.proxyPort=3128
systemProp.http.proxyUser=none
systemProp.http.proxyPassword=none
systemProp.http.nonProxyHosts=localhost
  systemProp.https.proxyHost=internet.proxy.mycompany.com
systemProp.https.proxyPort=3128
systemProp.https.proxyUser=none
systemProp.https.proxyPassword=none
systemProp.https.nonProxyHosts=localhost

For some reason, I must set the proxyUser and proxyPassword as a dummy value: ‘none’. If I leave those properties out, or set them blank gradle will fail with:

Caused by: org.gradle.internal.resource.ResourceException: Unable to load Maven meta-data from http://repo.spring.io/snapshot/org/springframework/springloaded/1.2.1.BUILD-SNAPSHOT/maven-metadata.xml.
...
Caused by: org.gradle.api.UncheckedIOException: Could not GET 'http://repo.spring.io/snapshot/org/springframework/springloaded/1.2.1.BUILD-SNAPSHOT/maven-metadata.xml'. Received status code 407 from server: authenticationrequired

That might be a Gradle issue right there. Not sure. Anyway, if I leave the dummy properties for username or password in as I did above, Gradle becomes stuck in an infinite loop. Here is the debug snippet that will loop endlessly:

15:52:33.322 [DEBUG] [org.apache.http.impl.client.SystemDefaultHttpClient] Resetting proxy auth state
15:52:33.322 [DEBUG] [org.apache.http.impl.conn.DefaultClientConnectionOperator] Connecting to internet.proxy.mycompany.com:3128
15:52:33.354 [DEBUG] [org.apache.http.client.protocol.RequestAddCookies] CookieSpec selected: best-match
15:52:33.354 [DEBUG] [org.apache.http.client.protocol.RequestAuthCache] Auth cache not set in the context
15:52:33.354 [DEBUG] [org.apache.http.client.protocol.RequestTargetAuthentication] Target auth state: UNCHALLENGED
15:52:33.354 [DEBUG] [org.apache.http.client.protocol.RequestProxyAuthentication] Proxy auth state: UNCHALLENGED
15:52:33.354 [DEBUG] [org.apache.http.impl.client.SystemDefaultHttpClient] Attempt 1811 to execute request
15:52:33.354 [DEBUG] [org.apache.http.impl.conn.DefaultClientConnection] Sending request: HEAD http://repo.spring.io/snapshot/org/springframework/springloaded/1.2.1.BUILD-SNAPSHOT/springloaded-1.2.1.BUILD-20140901.111542-15.pom HTTP/1.1
15:52:33.354 [DEBUG] [org.apache.http.headers] >> HEAD http://repo.spring.io/snapshot/org/springframework/springloaded/1.2.1.BUILD-SNAPSHOT/springloaded-1.2.1.BUILD-20140901.111542-15.pom HTTP/1.1
15:52:33.354 [DEBUG] [org.apache.http.headers] >> Accept-Encoding: gzip,deflate
15:52:33.354 [DEBUG] [org.apache.http.headers] >> Host: repo.spring.io
15:52:33.354 [DEBUG] [org.apache.http.headers] >> Proxy-Connection: Keep-Alive
15:52:33.354 [DEBUG] [org.apache.http.headers] >> User-Agent: Gradle/2.1 (Windows 7;6.1;amd64) (Oracle Corporation;1.7.0_67;24.65-b04)
15:52:33.418 [DEBUG] [org.apache.http.impl.conn.DefaultClientConnection] Receiving response: HTTP/1.1 407 authenticationrequired
15:52:33.418 [DEBUG] [org.apache.http.headers] << HTTP/1.1 407 authenticationrequired
15:52:33.418 [DEBUG] [org.apache.http.headers] << Via: 1.1 199.82.243.103 (McAfee Web Gateway 7.2.0.2.0.13603)
15:52:33.418 [DEBUG] [org.apache.http.headers] << Content-Type: text/html
15:52:33.418 [DEBUG] [org.apache.http.headers] << Cache-Control: no-cache
15:52:33.418 [DEBUG] [org.apache.http.headers] << Proxy-Connection: Keep-Alive
15:52:33.418 [DEBUG] [org.apache.http.headers] << Proxy-Authenticate: NTLM
15:52:33.418 [DEBUG] [org.apache.http.impl.client.SystemDefaultHttpClient] Authentication required
15:52:33.418 [DEBUG] [org.apache.http.impl.client.SystemDefaultHttpClient] internet.proxy.mycompany.com:3128 requested authentication
15:52:33.418 [DEBUG] [org.apache.http.impl.client.ProxyAuthenticationStrategy] Authentication schemes in the order of preference: [negotiate, Kerberos, NTLM, Digest, Basic]
15:52:33.418 [DEBUG] [org.apache.http.impl.client.ProxyAuthenticationStrategy] Challenge for negotiate authentication scheme not available
15:52:33.418 [DEBUG] [org.apache.http.impl.client.ProxyAuthenticationStrategy] Challenge for Kerberos authentication scheme not available
15:52:33.418 [DEBUG] [org.apache.http.impl.client.ProxyAuthenticationStrategy] Challenge for Digest authentication scheme not available
15:52:33.418 [DEBUG] [org.apache.http.impl.client.ProxyAuthenticationStrategy] Challenge for Basic authentication scheme not available
15:52:33.418 [DEBUG] [org.apache.http.impl.client.SystemDefaultHttpClient] Selected authentication options: [NTLM]
15:52:33.418 [DEBUG] [org.apache.http.impl.conn.DefaultClientConnection] Connection 0.0.0.0:60812<->199.82.243.100:3128 closed

I’m stuck. Anyone know if there are any solutions to my problem? Thanks!