From 96bbbebf0b3e800664ef589f3894f7888935cbc5 Mon Sep 17 00:00:00 2001 From: Brent Picasso Date: Fri, 30 Nov 2018 17:07:02 -0800 Subject: [PATCH] allow specifying of Android NDK API. Resolves #758 --- buildozer/default.spec | 3 +++ buildozer/targets/android_new.py | 3 +++ 2 files changed, 6 insertions(+) diff --git a/buildozer/default.spec b/buildozer/default.spec index 61153fe..a75b167 100644 --- a/buildozer/default.spec +++ b/buildozer/default.spec @@ -99,6 +99,9 @@ fullscreen = 0 # (str) Android NDK version to use #android.ndk = 9c +# (int) Android NDK API to use (optional) +#android.ndk.api = 19 + # (bool) Use --private data storage (True) or --dir public storage (False) #android.private_storage = True diff --git a/buildozer/targets/android_new.py b/buildozer/targets/android_new.py index 58862a1..f1b9c56 100644 --- a/buildozer/targets/android_new.py +++ b/buildozer/targets/android_new.py @@ -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))