common: properly parse version from NDK's source.properties

This commit is contained in:
Hans-Christoph Steiner 2021-03-09 12:01:57 +01:00
parent 6a875a1821
commit 649347dcd4
10 changed files with 65 additions and 1 deletions

View file

@ -3821,7 +3821,7 @@ def get_android_tools_versions(ndk_path=None):
with open(ndk_release_txt, 'r') as fp:
components.append((os.path.basename(ndk_path), fp.read()[:-1]))
pattern = re.compile('^Pkg.Revision=(.+)', re.MULTILINE)
pattern = re.compile(r'^Pkg.Revision *= *(.+)', re.MULTILINE)
for root, dirs, files in os.walk(sdk_path):
if 'source.properties' in files:
source_properties = os.path.join(root, 'source.properties')