Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions buildozer/targets/android.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,12 @@ def _sdkmanager(self, *args, **kwargs):
android_sdk_dir = self.android_sdk_dir
kwargs['cwd'] = kwargs.get('cwd', android_sdk_dir)
command = [self.sdkmanager_path, f"--sdk_root={android_sdk_dir}", *args]

http_proxy = os.environ.get('HTTP_PROXY', os.environ.get('http_proxy'))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

HTTPS should be included with these checks.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for reviewing. I updated to look at http and https env vars. Please let me know if you have any other feedback.

if http_proxy:
host, port = http_proxy.split(':')[-2:]
host = host.strip('/')
command.extend(['--proxy=http', f'--proxy_host={host}', f'--proxy_port={port}'])

if kwargs.pop('return_child', False):
return buildops.cmd_expect(
Expand Down
Loading