Gradlew在代理之后 [英] Gradlew behind a proxy

查看:144
本文介绍了Gradlew在代理之后的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个来自Gaelyk的样本(称为Bloogie),它正在使用gradlew。



我在代理之后。



我读过gradle文档,并发现这个:

gradle.properties

  systemProp.http.proxyHost = www.somehost.org 
systemProp.http.proxyPort = 8080
systemProp.http.proxyUser = userid
systemProp.http.proxyPassword =密码

但我不知道如何将这些信息放入包装gradlew中。任何想法?

解决方案

您只需创建一个名为 gradle.properties (使用上面提到的属性),并将其放置在您的gradle用户主目录(默认为 USER_HOME / .gradle )或您的项目目录中。

如果在用户home中找到,Gradle(包装器也会自动获取) gradle.properties 文件目录或项目目录。

欲了解更多信息,请阅读 Gradle用户指南,特别是第12.3节:通过网站访问网站代理服务器


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

systemProp.http.proxyHost=www.somehost.org
systemProp.http.proxyPort=8080
systemProp.http.proxyUser=userid
systemProp.http.proxyPassword=password

But I have no clue how to put this info into the wrapper gradlew. Any idea?

解决方案

All you have to do is to create a file called gradle.properties (with the properties you mentioned above) and place it under your gradle user home directory (which defaults to USER_HOME/.gradle) OR in your project directory.

Gradle (the wrapper too!!!) automatically picks up gradle.properties files if found in the user home directory or project directories.

For more info, read the Gradle user guide, especially at section 12.3: Accessing the web via a proxy

这篇关于Gradlew在代理之后的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆