mirror of
https://gitlab.com/fdroid/fdroidserver.git
synced 2024-09-17 18:50:11 +02:00
Run maven's deploy like ant and gradle do
This commit is contained in:
parent
4bb3b77554
commit
c631a3a8e1
@ -460,11 +460,11 @@ def build_local(app, thisbuild, vcs, build_dir, output_dir, srclib_dir, extlib_d
|
|||||||
# Build the release...
|
# Build the release...
|
||||||
if 'maven' in thisbuild:
|
if 'maven' in thisbuild:
|
||||||
print "Building Maven project..."
|
print "Building Maven project..."
|
||||||
mvncmd = [mvn3, 'package', '-Dandroid.sdk.path=' + sdk_path]
|
mvncmd = [mvn3, '-Dandroid.sdk.path=' + sdk_path]
|
||||||
if install:
|
if install:
|
||||||
mvncmd += ['-Dandroid.sign.debug=true']
|
mvncmd += ['-Dandroid.sign.debug=true', 'package', 'android:deploy']
|
||||||
else:
|
else:
|
||||||
mvncmd += ['-Dandroid.sign.debug=false', '-Dandroid.release=true']
|
mvncmd += ['-Dandroid.sign.debug=false', '-Dandroid.release=true', 'target']
|
||||||
if 'target' in thisbuild:
|
if 'target' in thisbuild:
|
||||||
target = thisbuild["target"].split('-')[1]
|
target = thisbuild["target"].split('-')[1]
|
||||||
subprocess.call(['sed', '-i',
|
subprocess.call(['sed', '-i',
|
||||||
@ -515,9 +515,6 @@ def build_local(app, thisbuild, vcs, build_dir, output_dir, srclib_dir, extlib_d
|
|||||||
else:
|
else:
|
||||||
commands += ['assemble'+flavour+'Release']
|
commands += ['assemble'+flavour+'Release']
|
||||||
|
|
||||||
if verbose:
|
|
||||||
print "Running %s on %s" % (" ".join(commands), gradle_dir)
|
|
||||||
|
|
||||||
p = FDroidPopen(commands, cwd=gradle_dir, verbose=verbose)
|
p = FDroidPopen(commands, cwd=gradle_dir, verbose=verbose)
|
||||||
|
|
||||||
else:
|
else:
|
||||||
@ -530,18 +527,9 @@ def build_local(app, thisbuild, vcs, build_dir, output_dir, srclib_dir, extlib_d
|
|||||||
else:
|
else:
|
||||||
cmd += ['release']
|
cmd += ['release']
|
||||||
p = FDroidPopen(cmd, cwd=root_dir, verbose=verbose, apkoutput=True)
|
p = FDroidPopen(cmd, cwd=root_dir, verbose=verbose, apkoutput=True)
|
||||||
|
|
||||||
if p.returncode != 0:
|
if p.returncode != 0:
|
||||||
raise BuildException("Build failed for %s:%s" % (app['id'], thisbuild['version']), p.stdout, p.stderr)
|
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']
|
print "Successfully built version " + thisbuild['version'] + ' of ' + app['id']
|
||||||
|
|
||||||
# Find the apk name in the output...
|
# Find the apk name in the output...
|
||||||
|
Loading…
Reference in New Issue
Block a user