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

Unified Diff: build/android/dex.py

Issue 12880007: Translate some ant to python (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@ant_split
Patch Set: Rebase Created 7 years, 9 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-obfuscate.xml ('k') | build/java.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/dex.py
diff --git a/build/android/dex.py b/build/android/dex.py
new file mode 100755
index 0000000000000000000000000000000000000000..a447a993b637dbdcb3c6495da500832829f03475
--- /dev/null
+++ b/build/android/dex.py
@@ -0,0 +1,41 @@
+#!/usr/bin/env python
+#
+# Copyright 2013 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+import fnmatch
+import optparse
+import os
+import subprocess
+import sys
+
+from pylib import build_utils
+
+
+def DoDex(options, paths):
+ dx_binary = os.path.join(options.android_sdk_root, 'platform-tools', 'dx')
+ dex_cmd = [dx_binary, '--dex', '--output', options.dex_path] + paths
+ subprocess.check_call(dex_cmd)
+
+
+def main(argv):
+ parser = optparse.OptionParser()
+ parser.add_option('--android-sdk-root', help='Android sdk root directory.')
+ parser.add_option('--dex-path', help='Dex output path.')
+ parser.add_option('--stamp', help='Path to touch on success.')
+
+ # TODO(newt): remove this once http://crbug.com/177552 is fixed in ninja.
+ parser.add_option('--ignore', help='Ignored.')
+
+ options, paths = parser.parse_args()
+
+ DoDex(options, paths)
+
+ if options.stamp:
+ build_utils.Touch(options.stamp)
+
+
+if __name__ == '__main__':
+ sys.exit(main(sys.argv))
+
« no previous file with comments | « build/android/ant/apk-obfuscate.xml ('k') | build/java.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698