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

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

Issue 313273004: Make test apks only dex files not in tested apk (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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/dex_action.gypi ('k') | build/java_apk.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/gyp/dex.py
diff --git a/build/android/gyp/dex.py b/build/android/gyp/dex.py
index b42ab0bc0b31eed054f3ae7c9fd5d4829decd94a..dedbcec00f97bd613f28d6ca5e0222b4b882b095 100755
--- a/build/android/gyp/dex.py
+++ b/build/android/gyp/dex.py
@@ -25,9 +25,9 @@ def DoDex(options, paths):
lambda: build_utils.CheckOutput(dex_cmd, print_stderr=False),
record_path=record_path,
input_paths=paths,
- input_strings=dex_cmd)
-
- build_utils.Touch(options.dex_path)
+ input_strings=dex_cmd,
+ force=not os.path.exists(options.dex_path))
+ build_utils.WriteJson(paths, options.dex_path + '.inputs')
def main():
@@ -44,6 +44,9 @@ def main():
'is enabled.'))
parser.add_option('--no-locals',
help='Exclude locals list from the dex file.')
+ parser.add_option('--excluded-paths-file',
+ help='Path to a file containing a list of paths to exclude '
+ 'from the dex file.')
options, paths = parser.parse_args()
@@ -51,6 +54,10 @@ def main():
and options.configuration_name == 'Release'):
paths = [options.proguard_enabled_input_path]
+ if options.excluded_paths_file:
+ exclude_paths = build_utils.ReadJson(options.excluded_paths_file)
+ paths = [p for p in paths if not p in exclude_paths]
+
DoDex(options, paths)
« no previous file with comments | « build/android/dex_action.gypi ('k') | build/java_apk.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698