From: Daniel Martí Date: Tue, 1 Apr 2014 17:25:43 +0000 (+0200) Subject: Fix apk path on gradle builds where both subdir and flavour@dir are used X-Git-Tag: 0.2~157 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=5dc29c8a05c16239c2f8cc077902f4cefcb7171e;p=fdroidserver.git Fix apk path on gradle builds where both subdir and flavour@dir are used --- diff --git a/fdroidserver/build.py b/fdroidserver/build.py index e8a0eb37..08e61bef 100644 --- a/fdroidserver/build.py +++ b/fdroidserver/build.py @@ -653,13 +653,19 @@ def build_local(app, thisbuild, vcs, build_dir, output_dir, srclib_dir, extlib_d src = 'python-for-android/dist/default/bin/{0}-{1}-release.apk'.format( bconfig.get('app', 'title'), bconfig.get('app', 'version')) elif thisbuild['type'] == 'gradle': + basename = app['id'] dd = build_dir if 'subdir' in thisbuild: dd = os.path.join(dd, thisbuild['subdir']) + basename = thisbuild['subdir'] + if '@' in thisbuild['gradle']: + dd = os.path.join(dd, thisbuild['gradle'].split('@')[1]) + basename = app['id'] if len(flavours) == 1 and flavours[0] == '': - name = '-'.join([os.path.basename(dd), 'release', 'unsigned']) + name = '-'.join([basename, 'release', 'unsigned']) else: - name = '-'.join([os.path.basename(dd), '-'.join(flavours), 'release', 'unsigned']) + name = '-'.join([basename, '-'.join(flavours), 'release', 'unsigned']) + dd = os.path.normpath(dd) src = os.path.join(dd, 'build', 'apk', name+'.apk') elif thisbuild['type'] == 'ant': stdout_apk = '\n'.join([