metadata: allow ndk: to be str or list of release or revision

There are two version numbers used for NDKs: the "release" and the
"revision".  The "release" is used in the download URL and zipball and the
"revision" is used in the source.properties and the gradle ndkVersion field.

Also, there are some builds which need multiple NDKs installed, so this
makes it possible to have a list of release/revision entries in build.ndk.
This does not yet add full support since _fdroidserver/build.py_ will also
need changes.
This commit is contained in:
Hans-Christoph Steiner 2021-05-26 10:58:46 +02:00
parent 096532dddb
commit 4686c06f62
3 changed files with 67 additions and 1 deletions

View file

@ -326,7 +326,11 @@ class Build(dict):
return 'ant'
def ndk_path(self):
return fdroidserver.common.config['ndk_paths'].get(self.ndk, '')
"""Returns the path to the first configured NDK or an empty string"""
ndk = self.ndk
if isinstance(ndk, list):
ndk = self.ndk[0]
return fdroidserver.common.config['ndk_paths'].get(ndk, '')
flagtypes = {