--test now works with maven. Fix debugging.

This commit is contained in:
Daniel Martí 2013-04-19 22:22:46 +02:00
parent 66f52fd59a
commit bc6650940f

View file

@ -338,10 +338,13 @@ def build_local(app, thisbuild, vcs, build_dir, output_dir, extlib_dir, tmp_dir,
# Build the release... # Build the release...
if 'maven' in thisbuild: if 'maven' in thisbuild:
p = subprocess.Popen([mvn3, 'clean', 'package', if install:
'-Dandroid.sdk.path=' + sdk_path, mvncmd = [mvn3, 'clean', 'package', '-Dandroid.sdk.path=' + sdk_path, '-Dandroid.sign.debug=true']
'-Dandroid.sign.debug=false'], else:
cwd=root_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE) mvncmd = [mvn3, 'clean', 'package', '-Dandroid.sdk.path=' + sdk_path, '-Dandroid.release=true']
if 'mvnflags' in thisbuild:
mvncmd += thisbuild['mvnflags']
p = subprocess.Popen(mvncmd, cwd=root_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
else: else:
if install: if install:
antcommands = ['debug','install'] antcommands = ['debug','install']
@ -357,6 +360,12 @@ def build_local(app, thisbuild, vcs, build_dir, output_dir, extlib_dir, tmp_dir,
if verbose: if verbose:
print output print output
if install: if install:
if 'maven' in thisbuild:
p = subprocess.Popen([mvn3, 'android:deploy', '-Dandroid.sdk.path=' + sdk_path],
cwd=root_dir, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
output, error = p.communicate()
if p.returncode != 0:
raise BuildException("Warning: Could not deploy %s:%s" % (app['id'], thisbuild['version']), output.strip(), error.strip())
return return
print "Build successful" print "Build successful"