Try to fix apk path matching with newer maven plugin versions

This commit is contained in:
Daniel Martí 2014-08-12 12:56:15 +02:00
parent 4c7c410d6e
commit 1af98e9f09

View file

@ -719,7 +719,8 @@ def build_local(app, thisbuild, vcs, build_dir, output_dir, srclib_dir, extlib_d
if thisbuild['type'] == 'maven': if thisbuild['type'] == 'maven':
stdout_apk = '\n'.join([ stdout_apk = '\n'.join([
line for line in p.output.splitlines() if any(a in line for a in ('.apk', '.ap_'))]) line for line in p.output.splitlines() if any(
a in line for a in ('.apk', '.ap_', '.jar'))])
m = re.match(r".*^\[INFO\] .*apkbuilder.*/([^/]*)\.apk", m = re.match(r".*^\[INFO\] .*apkbuilder.*/([^/]*)\.apk",
stdout_apk, re.S | re.M) stdout_apk, re.S | re.M)
if not m: if not m:
@ -728,6 +729,10 @@ def build_local(app, thisbuild, vcs, build_dir, output_dir, srclib_dir, extlib_d
if not m: if not m:
m = re.match(r'.*^\[INFO\] [^$]*aapt \[package,[^$]*' + bindir + r'/([^/]+)\.ap[_k][,\]]', m = re.match(r'.*^\[INFO\] [^$]*aapt \[package,[^$]*' + bindir + r'/([^/]+)\.ap[_k][,\]]',
stdout_apk, re.S | re.M) stdout_apk, re.S | re.M)
if not m:
m = re.match(r".*^\[INFO\] Building jar: .*/" + bindir + r"/(.+)\.jar",
stdout_apk, re.S | re.M)
if not m: if not m:
raise BuildException('Failed to find output') raise BuildException('Failed to find output')
src = m.group(1) src = m.group(1)