Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(479)

Unified Diff: build/android/gyp/ant.py

Issue 383613002: Make android_apk template actually create an apk (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@gn-apk-dex
Patch Set: Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « build/android/ant/apk-package.xml ('k') | build/android/gyp/finalize_apk.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/gyp/ant.py
diff --git a/build/android/gyp/ant.py b/build/android/gyp/ant.py
index 49e44bba6245188e52338ac32a309540606c18d5..5394b9ec7d5ae6792ea54b611ab4c438b3ba48e6 100755
--- a/build/android/gyp/ant.py
+++ b/build/android/gyp/ant.py
@@ -15,6 +15,7 @@ Also, when a command fails, this script will re-run that ant command with the
'-verbose' argument so that the failure is easier to debug.
"""
+import optparse
import sys
import traceback
@@ -22,14 +23,17 @@ from util import build_utils
def main(argv):
+ option_parser = optparse.OptionParser()
+ build_utils.AddDepfileOption(option_parser)
+ options, args = option_parser.parse_args(argv[1:])
+
try:
- args = argv[1:]
stdout = build_utils.CheckOutput(['ant'] + args)
except build_utils.CalledProcessError:
# It is very difficult to diagnose ant failures without the '-verbose'
# argument. So, when an ant command fails, re-run it with '-verbose' so that
# the cause of the failure is easier to identify.
- verbose_args = ['-verbose'] + [a for a in argv[1:] if a != '-quiet']
+ verbose_args = ['-verbose'] + [a for a in args if a != '-quiet']
try:
stdout = build_utils.CheckOutput(['ant'] + verbose_args)
except build_utils.CalledProcessError:
@@ -48,6 +52,14 @@ def main(argv):
break
print line
+ if options.depfile:
+ assert '-buildfile' in args
+ ant_buildfile = args[args.index('-buildfile') + 1]
+
+ build_utils.WriteDepfile(
+ options.depfile,
+ [ant_buildfile] + build_utils.GetPythonDependencies())
+
if __name__ == '__main__':
sys.exit(main(sys.argv))
« no previous file with comments | « build/android/ant/apk-package.xml ('k') | build/android/gyp/finalize_apk.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698