gradle取消代理配置

问题

当关闭ss&&idea本身的http_proxy时发现,无论如何gradle都会使用代理进行网络请求,排查很久未找到原因,怀疑是gradle自身在哪里进行了代理配置

解决方案

查看 gradle默认配置文件,一般位于~/.gradle

➜  .gradle cat gradle.properties
## For more details on how to configure your build environment visit
# http://www.gradle.org/docs/current/userguide/build_environment.html
#
# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
# Default value: -Xmx1024m -XX:MaxPermSize=256m
# org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
#
# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true
#Mon Jun 25 15:54:40 CST 2018
systemProp.https.proxyPort=1080
systemProp.http.proxyHost=127.0.0.1
systemProp.https.proxyHost=127.0.0.1
systemProp.http.proxyPort=1080

删除即可

    原文作者:ouyangan
    原文地址: https://www.jianshu.com/p/6a76a3a6c4c2
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞