Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cannot use proxy for gradle #25

Closed
mohammadrafigh opened this issue Apr 9, 2016 · 6 comments
Closed

cannot use proxy for gradle #25

mohammadrafigh opened this issue Apr 9, 2016 · 6 comments

Comments

@mohammadrafigh
Copy link

thanks for your great job,

I want to request a feature if it's not exists already. I want to add http and https proxy for gradle when fetching dependencies but I can not find any option.

@cesarferreira
Copy link
Owner

Hey, thanks for the compliment.
You mean provide a proxy because you can't access maven?

@mohammadrafigh
Copy link
Author

unfortunately some maven and gradle repositories have restrictions in my country.

@cesarferreira
Copy link
Owner

Aw ok, so that will happen whenever you use Gradle, you should try to find an alternative solution like changing your DNS's to the google ones or openDNS so you can solve your problem forever ;)
Don't get me wrong but that's not quite dryrun's problem so to speak.
Best of luck and say something when you find a solution 👍

@mohammadrafigh
Copy link
Author

umm... ok I know but it would be much better if you could include a gradle.properties when you want to run gradle build command which includes:

systemProp.https.proxyHost=user entered host
systemProp.https.proxyPort=user entered port
systemProp.http.proxyHost=user entered host
systemProp.http.proxyPort=user entered port

I thought it would be easy. otherwise thanks again for your fast reply.

@cesarferreira
Copy link
Owner

Didn't know about this, so you're saying that if I add a gradle.properties with this:

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

it will work for you?

@mohammadrafigh
Copy link
Author

Yes sure, in my case I use polipo so i use it like this without username and pass

systemProp.https.proxyHost=localhost
systemProp.https.proxyPort=8123
systemProp.http.proxyHost=localhost
systemProp.http.proxyPort=8123

One for http and one for https. Also you can do it without creating a gradle.properties file, but also with cli
Like this

gradlew -Dhttp.proxyHost=localhost -Dhttp.proxyPort=8123 -Dhttps.proxyHost=localhost -Dhttps.proxyPort=8123

I think this one should be easier to implement for you as you don't need to creat a new file. So you can add it to dryrun cli for example like this too:
dryrun -Dhttp.proxyHost=localhost -Dhttp.proxyPort=8123 -Dhttps.proxyHost=localhost -Dhttps.proxyPort=8123

Hope these would help ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants