Merge pull request #759 from autosportlabs/master

allow specifying of Android NDK API. Resolves #758
This commit is contained in:
Alexander Taylor 2018-12-01 20:17:40 +00:00 committed by GitHub
commit 635f0ddc0d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 1 deletions

View file

@ -90,7 +90,7 @@ fullscreen = 0
# (int) Android API to use
#android.api = 19
# (int) Minimum API required
# (int) Minimum API required. You will need to set the android.ndk.api to be as low as this value.
#android.minapi = 9
# (int) Android SDK version to use
@ -99,6 +99,9 @@ fullscreen = 0
# (str) Android NDK version to use
#android.ndk = 9c
# (int) Android NDK API to use (optional). This is the minimum API your app will support.
#android.ndk_api = 19
# (bool) Use --private data storage (True) or --dir public storage (False)
#android.private_storage = True

View file

@ -29,6 +29,9 @@ class TargetAndroidNew(TargetAndroid):
color = 'always' if USE_COLOR else 'never'
self.extra_p4a_args = ' --color={} --storage-dir="{}"'.format(
color, self._build_dir)
ndk_api = self.buildozer.config.getdefault('app', 'android.ndk_api', None)
if ndk_api is not None:
self.extra_p4a_args += ' --ndk-api={}'.format(ndk_api)
hook = self.buildozer.config.getdefault("app", "p4a.hook", None)
if hook is not None:
self.extra_p4a_args += ' --hook={}'.format(realpath(hook))