Chromium Code Reviews| Index: build/android/gyp/dex.py |
| diff --git a/build/android/gyp/dex.py b/build/android/gyp/dex.py |
| index 4e6233270aeec7bebbd55462858b23b2f21e559d..08a7699d5c608fb8c7f945589362966be42b4767 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,8 @@ def main(): |
| parser.add_option('--android-sdk-tools', |
| help='Android sdk build tools directory.') |
| + parser.add_option('--output-directory', |
| + help='Path to the output build directory.') |
|
cjhopman
2015/06/26 22:52:58
I would maybe have this default to the current dir
|
| parser.add_option('--dex-path', help='Dex output path.') |
| parser.add_option('--configuration-name', |
| help='The build CONFIGURATION_NAME.') |
| @@ -66,8 +70,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) |