mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-09-13 22:42:29 +03:00
gradle: stop trying to patch outputFile
This often breaks since we're just removing a single line. Instead, use a much more reliable way of finding output apks.
This commit is contained in:
parent
1683df0cf8
commit
4482ba971d
2 changed files with 9 additions and 8 deletions
|
@ -789,7 +789,8 @@ def build_local(app, build, vcs, build_dir, output_dir, srclib_dir, extlib_dir,
|
||||||
os.path.join(root_dir, 'build', 'outputs', 'apk'),
|
os.path.join(root_dir, 'build', 'outputs', 'apk'),
|
||||||
os.path.join(root_dir, 'build', 'apk'),
|
os.path.join(root_dir, 'build', 'apk'),
|
||||||
]:
|
]:
|
||||||
apks = glob.glob(os.path.join(apks_dir, '*-release-unsigned.apk'))
|
for apkglob in ['*-release-unsigned.apk', '*-unsigned.apk', '*.apk']:
|
||||||
|
apks = glob.glob(os.path.join(apks_dir, apkglob))
|
||||||
|
|
||||||
if len(apks) > 1:
|
if len(apks) > 1:
|
||||||
raise BuildException('More than one resulting apks found in %s' % apks_dir,
|
raise BuildException('More than one resulting apks found in %s' % apks_dir,
|
||||||
|
@ -797,6 +798,8 @@ def build_local(app, build, vcs, build_dir, output_dir, srclib_dir, extlib_dir,
|
||||||
if len(apks) == 1:
|
if len(apks) == 1:
|
||||||
src = apks[0]
|
src = apks[0]
|
||||||
break
|
break
|
||||||
|
if src is not None:
|
||||||
|
break
|
||||||
|
|
||||||
if src is None:
|
if src is None:
|
||||||
raise BuildException('Failed to find any output apks')
|
raise BuildException('Failed to find any output apks')
|
||||||
|
|
|
@ -1636,8 +1636,6 @@ gradle_signing_configs = re.compile(r'^[\t ]*signingConfigs[ \t]*{[ \t]*$')
|
||||||
gradle_line_matches = [
|
gradle_line_matches = [
|
||||||
re.compile(r'^[\t ]*signingConfig [^ ]*$'),
|
re.compile(r'^[\t ]*signingConfig [^ ]*$'),
|
||||||
re.compile(r'.*android\.signingConfigs\.[^{]*$'),
|
re.compile(r'.*android\.signingConfigs\.[^{]*$'),
|
||||||
re.compile(r'.*variant\.outputFile = .*'),
|
|
||||||
re.compile(r'.*output\.outputFile = .*'),
|
|
||||||
re.compile(r'.*\.readLine\(.*'),
|
re.compile(r'.*\.readLine\(.*'),
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue