Don't allow '_' in first place of version code

Fixes a regression of 2cb0ff45. Example:

versionCode project.versionCode_plus

931b0a3087/app/build.gradle (L38)
This commit is contained in:
Jochen Sprickerhof 2021-06-09 10:34:21 +02:00 committed by Jochen Sprickerhof
parent a946ae2b44
commit a9a336a12b
3 changed files with 23 additions and 1 deletions

View file

@ -1579,7 +1579,7 @@ def remove_debuggable_flags(root_dir):
os.path.join(root, 'AndroidManifest.xml'))
vcsearch_g = re.compile(r'''\b[Vv]ersionCode\s*=?\s*["'(]*([0-9_]+)["')]*''').search
vcsearch_g = re.compile(r'''\b[Vv]ersionCode\s*=?\s*["'(]*([0-9][0-9_]*)["')]*''').search
vnsearch_g = re.compile(r'''\b[Vv]ersionName\s*=?\s*\(?(["'])((?:(?=(\\?))\3.)*?)\1''').search
vnssearch_g = re.compile(r'''\b[Vv]ersionNameSuffix\s*=?\s*(["'])((?:(?=(\\?))\3.)*?)\1''').search
psearch_g = re.compile(r'''\b(packageName|applicationId)\s*=*\s*["']([^"']+)["']''').search