Allow to exlude jar in android_standalone_library.

R=cjhopman@chromium.org

Review URL: https://codereview.chromium.org/951353003

Cr-Original-Commit-Position: refs/heads/master@{#318214}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: cd6ee6d5ce5a42c50d0284daeaa7bd664f58b8fb
This commit is contained in:
qsr 2015-02-26 02:52:54 -08:00 коммит произвёл Commit bot
Родитель 01711732ce
Коммит 2c00d89567
4 изменённых файлов: 14 добавлений и 8 удалений

Просмотреть файл

@ -50,9 +50,8 @@ def main():
parser.add_option('--no-locals',
help='Exclude locals list from the dex file.')
parser.add_option('--inputs', help='A list of additional input paths.')
parser.add_option('--excluded-paths-file',
help='Path to a file containing a list of paths to exclude '
'from the dex file.')
parser.add_option('--excluded-paths',
help='A list of paths to exclude from the dex file.')
options, paths = parser.parse_args(args)
@ -63,13 +62,13 @@ 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]
if options.inputs:
paths += build_utils.ParseGypList(options.inputs)
if options.excluded_paths:
exclude_paths = build_utils.ParseGypList(options.excluded_paths)
paths = [p for p in paths if not p in exclude_paths]
DoDex(options, paths)
if options.depfile:

Просмотреть файл

@ -1093,5 +1093,9 @@ template("deps_dex") {
output = invoker.dex_path
dex_arg_key = "${rebased_build_config}:final_dex:dependency_dex_files"
args = [ "--inputs=@FileArg($dex_arg_key)" ]
if (defined(invoker.excluded_jars)) {
excluded_jars = rebase_path(invoker.excluded_jars, root_build_dir)
args += [ "--excluded-paths=${excluded_jars}" ]
}
}
}

Просмотреть файл

@ -1032,6 +1032,9 @@ template("android_standalone_library") {
deps_dex(target_name) {
deps = invoker.deps
dex_path = invoker.dex_path
if (defined(invoker.excluded_jars)) {
excluded_jars = invoker.excluded_jars
}
}
}

Просмотреть файл

@ -811,7 +811,7 @@
['is_test_apk == 1 and tested_apk_dex_path != "/"', {
'variables': {
'dex_additional_options': [
'--excluded-paths-file', '>(tested_apk_dex_path).inputs'
'--excluded-paths', '@FileArg(>(tested_apk_dex_path).inputs)'
],
},
'inputs': [