Skip to content

Commit

Permalink
Add spec option to skip automated update of installed android package
Browse files Browse the repository at this point in the history
  • Loading branch information
pastcompute committed Feb 20, 2016
1 parent b4f21f7 commit 53cc7f1
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
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

1 comment on commit 53cc7f1

@AndrewSmart
Copy link

Choose a reason for hiding this comment

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

Thank you! Was just looking into this.

Please sign in to comment.