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

Add spec option to skip automated update of installed android package #290

Merged
merged 1 commit into from
Feb 24, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
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
5 changes: 5 additions & 0 deletions buildozer/default.spec
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,11 @@ fullscreen = 1
# (list) python-for-android whitelist
#android.p4a_whitelist =

# (bool) If True, then skip trying to update the Android sdk
# This can be useful to avoid excess Internet downloads or save time
# when an update is due and you just want to test/build your package
# android.skip_update = False

# (str) Android entry point, default is ok for Kivy-based app
#android.entrypoint = org.renpy.android.PythonActivity

Expand Down
7 changes: 6 additions & 1 deletion buildozer/targets/android.py
Original file line number Diff line number Diff line change
Expand Up @@ -401,8 +401,13 @@ def _install_android_packages(self):

# 1. update the tool and platform-tools if needed
packages = self._android_list_sdk()
skip_upd = self.buildozer.config.getdefault('app',
'android.skip_update', False)
if 'tools' in packages or 'platform-tools' in packages:
self._android_update_sdk('tools,platform-tools')
if not skip_upd:
self._android_update_sdk('tools,platform-tools')
else:
self.buildozer.info('Skipping Android SDK update due to spec file setting')

# 2. install the latest build tool
v_build_tools = self._read_version_subdir(self.android_sdk_dir,
Expand Down