From: Daniel Martí Date: Thu, 24 Sep 2015 01:52:59 +0000 (-0700) Subject: checkupdates: ignore gradle comments X-Git-Tag: 0.5.0~77 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=27a5dc842921a91b67c3c94c8161b0e5ed4657b6;p=fdroidserver.git checkupdates: ignore gradle comments --- diff --git a/fdroidserver/common.py b/fdroidserver/common.py index 19053ec7..67885fd6 100644 --- a/fdroidserver/common.py +++ b/fdroidserver/common.py @@ -1026,6 +1026,8 @@ def parse_androidmanifests(paths, ignoreversions=None): if gradle: for line in file(path): + if gradle_comment.match(line): + continue # Grab first occurence of each to avoid running into # alternative flavours and builds. if not package: @@ -1605,8 +1607,10 @@ def FDroidPopen(commands, cwd=None, output=True): return result +gradle_comment = re.compile(r'[ ]*//') + + def remove_signing_keys(build_dir): - comment = re.compile(r'[ ]*//') signing_configs = re.compile(r'^[\t ]*signingConfigs[ \t]*{[ \t]*$') line_matches = [ re.compile(r'^[\t ]*signingConfig [^ ]*$'), @@ -1634,7 +1638,7 @@ def remove_signing_keys(build_dir): line = line.rstrip('\\\n') + lines[i] i += 1 - if comment.match(line): + if gradle_comment.match(line): o.write(line) continue