1
0
mirror of https://gitlab.com/fdroid/fdroidserver.git synced 2024-11-11 01:40:11 +01:00

Support auto-install of multiple NDKs

This commit is contained in:
Gregor Düster 2021-12-07 18:25:02 +01:00
parent 8bba38f5dc
commit 57c85ccb96
No known key found for this signature in database
GPG Key ID: 1B4181FC97673B9D

View File

@ -275,7 +275,7 @@ class Build(dict):
self.scandelete = [] self.scandelete = []
self.build = '' self.build = ''
self.buildjni = [] self.buildjni = []
self.ndk = None self.ndk = []
self.preassemble = [] self.preassemble = []
self.gradleprops = [] self.gradleprops = []
self.antcommands = [] self.antcommands = []
@ -325,8 +325,9 @@ class Build(dict):
def ndk_path(self) -> str: def ndk_path(self) -> str:
"""Return the path string of the first configured NDK or an empty string.""" """Return the path string of the first configured NDK or an empty string."""
ndk = self.ndk ndk = self.ndk
if isinstance(ndk, list): if not ndk:
ndk = self.ndk[0] return ''
ndk = ndk[0]
path = common.config['ndk_paths'].get(ndk) path = common.config['ndk_paths'].get(ndk)
if path and not isinstance(path, str): if path and not isinstance(path, str):
raise TypeError('NDK path is not string') raise TypeError('NDK path is not string')
@ -364,6 +365,7 @@ flagtypes = {
'novcheck': TYPE_BOOL, 'novcheck': TYPE_BOOL,
'antifeatures': TYPE_STRINGMAP, 'antifeatures': TYPE_STRINGMAP,
'timeout': TYPE_INT, 'timeout': TYPE_INT,
'ndk': TYPE_LIST,
} }