Gradlew behind a proxy

后端 未结 16 1419
一个人的身影
一个人的身影 2020-12-04 12:26

I have a sample from Gaelyk (called Bloogie) and it is using gradlew.

I am behind a proxy.

I\'ve read gradle docs and found this:

gradle.properties

相关标签:
16条回答
  • 2020-12-04 12:40

    after of this JDK update, I couldn't use gradlew behind a proxy again. and finally I found a JDK has disabled Basic authentication for HTTPS tunneling by default. so I have to add this property for gradle.properties in addition to proxy settings

    systemProp.jdk.http.auth.tunneling.disabledSchemes=""
    

    I hope it would be helpful for someone who struggle same problem

    0 讨论(0)
  • 2020-12-04 12:43

    This problem with the Gradle Wrapper has been fixed with Gradle 1.0-milestone-8. Give it a shot.

    0 讨论(0)
  • 2020-12-04 12:44

    I have the same proxy issue while working with Cordova project.

    To fix the issue, I have created a new gradle.properties file under the android folder of my Cordova project (hello/platforms/android), and added the code from your question

    systemProp.http.proxyHost=proxy.yourproxysite.com
    systemProp.http.proxyPort=8080
    systemProp.http.proxyUser=yourusername
    systemProp.http.proxyPassword=password
    
    0 讨论(0)
  • 2020-12-04 12:46

    I could not get the proxy property to work until I set the https proxy:

    systemProp.https.proxyHost=www.somehost.org
    systemProp.https.proxyPort=8080
    

    However I had to use the http property for user name and password:

    systemProp.http.proxyUser=userid
    systemProp.http.proxyPassword=password
    
    0 讨论(0)
  • 2020-12-04 12:46

    I was found that reading of properties from gradle.properties can be incorrect. In case line contains trail white space, gradle cannot find proxy. check your proxy file and cut whitespace at the end of line. Can be help

    0 讨论(0)
  • 2020-12-04 12:49

    If you need https access behind a proxy, please consider defining also the same set of properties for systemProp.https.

    systemProp.https.proxyHost=www.somehost.org
    systemProp.https.proxyPort=8080
    

    See Can't build Android app using crashlytics behind VPN and proxy for more information.

    0 讨论(0)
提交回复
热议问题