enforce p4a --ndk-api to respect minimum api set in buildozer.spec. Fixes #772

This commit is contained in:
Mathieu Virbel 2019-01-07 19:55:28 +01:00
parent ebfc90eecc
commit 6b004f9778
2 changed files with 9 additions and 3 deletions

View file

@ -737,6 +737,8 @@ class TargetAndroid(Target):
self.android_api)),
("--minsdk", config.getdefault('app', 'android.minapi',
self.android_minapi)),
("--ndk-api", config.getdefault('app', 'android.minapi',
self.android_minapi)),
]
is_private_storage = config.getbooldefault(
'app', 'android.private_storage', True)

View file

@ -73,10 +73,14 @@ class TargetAndroidNew(TargetAndroid):
if local_recipes:
options.append('--local-recipes')
options.append(local_recipes)
available_modules = self._p4a(
"create --dist_name={} --bootstrap={} --requirements={} --arch {} {}".format(
config = self.buildozer.config
self._p4a(
("create --dist_name={} --bootstrap={} --requirements={} "
"--ndk-api {} "
"--arch {} {}").format(
dist_name, self._p4a_bootstrap, requirements,
self.buildozer.config.getdefault('app', 'android.arch', "armeabi-v7a"), " ".join(options)),
config.getdefault('app', 'android.minapi', self.android_minapi),
config.getdefault('app', 'android.arch', "armeabi-v7a"), " ".join(options)),
get_stdout=True)[0]
def get_dist_dir(self, dist_name):