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

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

Issue 1211653002: [Android] Make dex exclude paths relative to output dir. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Default output_dir to cwd (and remove change to internal_rules.gni) Created 5 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') | no next file » | 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 4e6233270aeec7bebbd55462858b23b2f21e559d..c26d23a61166627dba6c0acddd189301dd35c18a 100755
--- a/build/android/gyp/dex.py
+++ b/build/android/gyp/dex.py
@@ -28,7 +28,9 @@ def DoDex(options, paths):
input_paths=paths,
input_strings=dex_cmd,
force=not os.path.exists(options.dex_path))
- build_utils.WriteJson(paths, options.dex_path + '.inputs')
+ build_utils.WriteJson(
+ [os.path.relpath(p, options.output_directory) for p in paths],
+ options.dex_path + '.inputs')
def main():
@@ -39,6 +41,9 @@ def main():
parser.add_option('--android-sdk-tools',
help='Android sdk build tools directory.')
+ parser.add_option('--output-directory',
+ default=os.getcwd(),
+ help='Path to the output build directory.')
parser.add_option('--dex-path', help='Dex output path.')
parser.add_option('--configuration-name',
help='The build CONFIGURATION_NAME.')
@@ -66,8 +71,10 @@ def main():
paths += build_utils.ParseGypList(options.inputs)
if options.excluded_paths:
+ # Excluded paths are relative to the output directory.
exclude_paths = build_utils.ParseGypList(options.excluded_paths)
- paths = [p for p in paths if not p in exclude_paths]
+ paths = [p for p in paths if not
+ os.path.relpath(p, options.output_directory) in exclude_paths]
DoDex(options, paths)
« no previous file with comments | « build/android/dex_action.gypi ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698