Add spec option to skip automated update of installed android package

This commit is contained in:
Andrew McDonnell 2016-02-20 21:32:27 +10:30
parent b4f21f7f54
commit 53cc7f1bea
2 changed files with 11 additions and 1 deletions

View file

@ -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

View file

@ -401,8 +401,13 @@ class TargetAndroid(Target):
# 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,