mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-11-05 06:50:29 +03:00
common.get_android_tools_versions() for modern NDK dir layout
NDK r10e is still in use, but is so old, it does not have the modern sdkmanager package metadata.
This commit is contained in:
parent
0dd5a7db64
commit
898624dcac
9 changed files with 52 additions and 17 deletions
|
|
@ -4043,10 +4043,10 @@ def get_android_tools_versions():
|
|||
sdk_path = config['sdk_path']
|
||||
if sdk_path[-1] != '/':
|
||||
sdk_path += '/'
|
||||
components = []
|
||||
for ndk_path in config.get('ndk_paths', []):
|
||||
components = set()
|
||||
for ndk_path in config.get('ndk_paths', {}).values():
|
||||
version = get_ndk_version(ndk_path)
|
||||
components.append((os.path.basename(ndk_path), str(version)))
|
||||
components.add((os.path.relpath(ndk_path, sdk_path), str(version)))
|
||||
|
||||
pattern = re.compile(r'^Pkg.Revision *= *(.+)', re.MULTILINE)
|
||||
for root, dirs, files in os.walk(sdk_path):
|
||||
|
|
@ -4055,9 +4055,9 @@ def get_android_tools_versions():
|
|||
with open(source_properties, 'r') as fp:
|
||||
m = pattern.search(fp.read())
|
||||
if m:
|
||||
components.append((root[len(sdk_path):], m.group(1)))
|
||||
components.add((os.path.relpath(root, sdk_path), m.group(1)))
|
||||
|
||||
return components
|
||||
return sorted(components)
|
||||
|
||||
|
||||
def get_android_tools_version_log():
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue