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

Side by Side Diff: build/android/gyp/dex.py

Issue 951353003: Allow to exlude jar in android_standalone_library. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase path before passing it to external command. Created 5 years, 10 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 unified diff | Download patch
« no previous file with comments | « no previous file | build/config/android/internal_rules.gni » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # 2 #
3 # Copyright 2013 The Chromium Authors. All rights reserved. 3 # Copyright 2013 The Chromium Authors. All rights reserved.
4 # Use of this source code is governed by a BSD-style license that can be 4 # Use of this source code is governed by a BSD-style license that can be
5 # found in the LICENSE file. 5 # found in the LICENSE file.
6 6
7 import optparse 7 import optparse
8 import os 8 import os
9 import sys 9 import sys
10 10
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 parser.add_option('--configuration-name', 43 parser.add_option('--configuration-name',
44 help='The build CONFIGURATION_NAME.') 44 help='The build CONFIGURATION_NAME.')
45 parser.add_option('--proguard-enabled', 45 parser.add_option('--proguard-enabled',
46 help='"true" if proguard is enabled.') 46 help='"true" if proguard is enabled.')
47 parser.add_option('--proguard-enabled-input-path', 47 parser.add_option('--proguard-enabled-input-path',
48 help=('Path to dex in Release mode when proguard ' 48 help=('Path to dex in Release mode when proguard '
49 'is enabled.')) 49 'is enabled.'))
50 parser.add_option('--no-locals', 50 parser.add_option('--no-locals',
51 help='Exclude locals list from the dex file.') 51 help='Exclude locals list from the dex file.')
52 parser.add_option('--inputs', help='A list of additional input paths.') 52 parser.add_option('--inputs', help='A list of additional input paths.')
53 parser.add_option('--excluded-paths-file', 53 parser.add_option('--excluded-paths',
54 help='Path to a file containing a list of paths to exclude ' 54 help='A list of paths to exclude from the dex file.')
55 'from the dex file.')
56 55
57 options, paths = parser.parse_args(args) 56 options, paths = parser.parse_args(args)
58 57
59 required_options = ('android_sdk_tools',) 58 required_options = ('android_sdk_tools',)
60 build_utils.CheckOptions(options, parser, required=required_options) 59 build_utils.CheckOptions(options, parser, required=required_options)
61 60
62 if (options.proguard_enabled == 'true' 61 if (options.proguard_enabled == 'true'
63 and options.configuration_name == 'Release'): 62 and options.configuration_name == 'Release'):
64 paths = [options.proguard_enabled_input_path] 63 paths = [options.proguard_enabled_input_path]
65 64
66 if options.excluded_paths_file:
67 exclude_paths = build_utils.ReadJson(options.excluded_paths_file)
68 paths = [p for p in paths if not p in exclude_paths]
69
70 if options.inputs: 65 if options.inputs:
71 paths += build_utils.ParseGypList(options.inputs) 66 paths += build_utils.ParseGypList(options.inputs)
72 67
68 if options.excluded_paths:
69 exclude_paths = build_utils.ParseGypList(options.excluded_paths)
70 paths = [p for p in paths if not p in exclude_paths]
71
73 DoDex(options, paths) 72 DoDex(options, paths)
74 73
75 if options.depfile: 74 if options.depfile:
76 build_utils.WriteDepfile( 75 build_utils.WriteDepfile(
77 options.depfile, 76 options.depfile,
78 paths + build_utils.GetPythonDependencies()) 77 paths + build_utils.GetPythonDependencies())
79 78
80 79
81 80
82 if __name__ == '__main__': 81 if __name__ == '__main__':
83 sys.exit(main()) 82 sys.exit(main())
OLDNEW
« no previous file with comments | « no previous file | build/config/android/internal_rules.gni » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698