From: Daniel Martí Date: Wed, 16 Oct 2013 21:34:51 +0000 (+0200) Subject: Run maven's deploy like ant and gradle do X-Git-Tag: 0.1~338 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=c631a3a8e11c5bf3b2d28b7bdd1c70d649aecd29;p=fdroidserver.git Run maven's deploy like ant and gradle do --- diff --git a/fdroidserver/build.py b/fdroidserver/build.py index 07583286..4cccd5b7 100644 --- a/fdroidserver/build.py +++ b/fdroidserver/build.py @@ -460,11 +460,11 @@ def build_local(app, thisbuild, vcs, build_dir, output_dir, srclib_dir, extlib_d # Build the release... if 'maven' in thisbuild: print "Building Maven project..." - mvncmd = [mvn3, 'package', '-Dandroid.sdk.path=' + sdk_path] + mvncmd = [mvn3, '-Dandroid.sdk.path=' + sdk_path] if install: - mvncmd += ['-Dandroid.sign.debug=true'] + mvncmd += ['-Dandroid.sign.debug=true', 'package', 'android:deploy'] else: - mvncmd += ['-Dandroid.sign.debug=false', '-Dandroid.release=true'] + mvncmd += ['-Dandroid.sign.debug=false', '-Dandroid.release=true', 'target'] if 'target' in thisbuild: target = thisbuild["target"].split('-')[1] subprocess.call(['sed', '-i', @@ -515,9 +515,6 @@ def build_local(app, thisbuild, vcs, build_dir, output_dir, srclib_dir, extlib_d else: commands += ['assemble'+flavour+'Release'] - if verbose: - print "Running %s on %s" % (" ".join(commands), gradle_dir) - p = FDroidPopen(commands, cwd=gradle_dir, verbose=verbose) else: @@ -530,18 +527,9 @@ def build_local(app, thisbuild, vcs, build_dir, output_dir, srclib_dir, extlib_d else: cmd += ['release'] p = FDroidPopen(cmd, cwd=root_dir, verbose=verbose, apkoutput=True) + if p.returncode != 0: raise BuildException("Build failed for %s:%s" % (app['id'], thisbuild['version']), p.stdout, p.stderr) - if install: - if 'maven' in thisbuild: - p = FDroidPopen([mvn3, 'android:deploy', - '-Dandroid.sdk.path=' + sdk_path], - cwd=root_dir, verobse=verbose) - if p.returncode != 0: - raise BuildException("Warning: Could not deploy %s:%s" - % (app['id'], thisbuild['version']), - p.stdout, p.stderr) - return print "Successfully built version " + thisbuild['version'] + ' of ' + app['id'] # Find the apk name in the output...