mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-11-05 06:50:29 +03:00
build: improve regsub pattern for setting buildToolsVersion
This addresses the discussion in !64 https://gitlab.com/fdroid/fdroidserver/merge_requests/64 Sometimes, buildToolsVersion is a kind of gradle macro call, and other times it is a variable assignment. This regsub pattern now handles both of those cases.
This commit is contained in:
parent
6db6433e97
commit
d53a5af715
10 changed files with 717 additions and 8 deletions
|
|
@ -436,8 +436,8 @@ def adapt_gradle(build_dir):
|
|||
if not os.path.isfile(path):
|
||||
continue
|
||||
logging.debug("Adapting %s at %s" % (filename, path))
|
||||
common.regsub_file(r"""(\s*)buildToolsVersion[\s'"=]+.*""",
|
||||
r"""\1buildToolsVersion = '%s'""" % config['build_tools'],
|
||||
common.regsub_file(r"""(\s*)buildToolsVersion([\s=]+)['"].*""",
|
||||
r"""\1buildToolsVersion\2'%s'""" % config['build_tools'],
|
||||
path)
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue