---
title: "gradle 代理"
author: "小于Brick"
date: "2016-10-18T10:52:26Z"
tags: ["gradle", "代理"]
categories: ["编程语言"]
slug: "gradle"
draft: false
lastmod: "2016-10-18T10:52:51Z"
id: 2331244
url: "https://youngbrick.iteye.com/blog/2331244"
---

参考：https://docs.gradle.org/current/userguide/build\_environment.html#sec:accessing\_the\_web\_via\_a\_proxy

 

 

**Example 12.2. Configuring an HTTP proxy**

`gradle.properties`

```
systemProp.http.proxyHost=www.somehost.org
systemProp.http.proxyPort=8080
systemProp.http.proxyUser=userid
systemProp.http.proxyPassword=password
systemProp.http.nonProxyHosts=*.nonproxyrepos.com|localhost
```

 

 

**Example 12.3. Configuring an HTTPS proxy**

`gradle.properties`

```
systemProp.https.proxyHost=www.somehost.org
systemProp.https.proxyPort=8080
systemProp.https.proxyUser=userid
systemProp.https.proxyPassword=password
systemProp.http.nonProxyHosts=*.nonproxyrepos.com|localhost
```