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

Merge branch 'fix_autoname' into 'master'

Don't return Gradle variables as string

See merge request fdroid/fdroidserver!909
This commit is contained in:
Hans-Christoph Steiner 2021-05-13 13:05:17 +00:00
commit 72cef85201

View File

@ -1425,7 +1425,11 @@ def unescape_string(string):
def retrieve_string(app_dir, string, xmlfiles=None):
if not string.startswith('@string/'):
if string.startswith('@string/'):
name = string[len('@string/'):]
elif string.startswith('${'):
return '' # Gradle variable
else:
return unescape_string(string)
if xmlfiles is None:
@ -1438,8 +1442,6 @@ def retrieve_string(app_dir, string, xmlfiles=None):
if os.path.basename(root) == 'values':
xmlfiles += [os.path.join(root, x) for x in files if x.endswith('.xml')]
name = string[len('@string/'):]
def element_content(element):
if element.text is None:
return ""