diff --git a/fdroidserver/build.py b/fdroidserver/build.py index 86ca309e..672a06cf 100644 --- a/fdroidserver/build.py +++ b/fdroidserver/build.py @@ -488,7 +488,9 @@ def build_local(app, thisbuild, vcs, build_dir, output_dir, srclib_dir, extlib_d src = m.group(1) src = os.path.join(bindir, src) + '.apk' elif 'gradle' in thisbuild: - src = os.path.join(build_dir, 'build', 'apk', '-'.join([app['id'], flavour, 'release', 'unsigned'])+'.apk') + if 'subdir' in thisbuild: + build_dir = os.path.join(build_dir, thisbuild['subdir']) + src = os.path.join(build_dir, 'build', 'apk', '-'.join([os.path.basename(build_dir), flavour, 'release', 'unsigned'])+'.apk') else: src = re.match(r".*^.*Creating (.+) for release.*$.*", output, re.S|re.M).group(1)