代理背后的 Gradlew [英] Gradlew behind a proxy
问题描述
我有一个来自 Gaelyk(称为 Bloogie)的样本,它使用的是 gradlew.
I have a sample from Gaelyk (called Bloogie) and it is using gradlew.
我支持代理.
我已经阅读了 gradle 文档并找到了这个:
I've read gradle docs and found this:
gradle.properties
gradle.properties
systemProp.http.proxyHost=www.somehost.org
systemProp.http.proxyPort=8080
systemProp.http.proxyUser=userid
systemProp.http.proxyPassword=password
但我不知道如何将此信息放入包装器 gradlew 中.有什么想法吗?
But I have no clue how to put this info into the wrapper gradlew. Any idea?
推荐答案
您所要做的就是创建一个名为 gradle.properties
的文件(具有您上面提到的属性)并将其放在您的 gradle 用户主目录(默认为 USER_HOME/.gradle
)或在您的项目目录中.
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(也是包装器!!!)如果在用户主目录或项目目录中找到 gradle.properties
文件,它会自动选取.
Gradle (the wrapper too!!!) automatically picks up gradle.properties
files if found in the user home directory or project directories.
有关详细信息,请阅读 Gradle 用户指南,尤其是第 12.3 节: 通过代理访问网络
For more info, read the Gradle user guide, especially at section 12.3: Accessing the web via a proxy
这篇关于代理背后的 Gradlew的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!