Gradle installation having a proxy issue

前端 未结 2 660
悲哀的现实
悲哀的现实 2020-12-11 03:55

I\'m running into issues building android projects on a server in a corporate network behind a proxy on Jenkins. Have tried with both the jenkins gradle, as well as gradlew.

2条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-11 04:33

    You have to add the following configuration in gradle.configuration.These are the proxy settings needed to be configured if you are working behind proxy.

    Source: (https://docs.gradle.org/current/userguide/build_environment.html#sec:accessing_the_web_via_a_proxy)

    And don't add 'http.// or 'https:' in systemProp.http.proxyHost only 'www.host.com' .Also comment out the systemProp.http.proxyUser or proxypassword if you don't need it to login into the proxy.

    systemProp.proxySet=true
    systemProp.http.keepAlive=true
    systemProp.http.proxyHost=www.host.com
    systemProp.http.proxyPort=port
    systemProp.http.proxyUser=username_ifneeded
    systemProp.http.proxyPassword=password_needed
    systemProp.http.nonProxyHosts=local.net|some.host.com
    
    systemProp.https.keepAlive=true
    systemProp.https.proxyHost=host
    systemProp.https.proxyPort=port
    systemProp.https.proxyUser=username_ifneeded
    systemProp.https.proxyPassword=password_ifneeded
    systemProp.https.nonProxyHosts=local.net|some.host.com
    

提交回复
热议问题