OLD | NEW |
1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 The Chromium Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 import("//build/config/android/rules.gni") | 5 import("//build/config/android/rules.gni") |
6 import("//third_party/ijar/ijar.gni") | 6 import("//third_party/ijar/ijar.gni") |
7 | 7 |
8 sun_tools_jar_path = "$root_gen_dir/sun_tools_jar/tools.jar" | 8 sun_tools_jar_path = "$root_gen_dir/sun_tools_jar/tools.jar" |
9 | 9 |
| 10 # Create or update the API versions cache if necessary by running a |
| 11 # functionally empty lint task. This prevents racy creation of the |
| 12 # cache while linting java targets in android_lint. |
| 13 action("prepare_android_lint_cache") { |
| 14 _cache_dir = "${root_out_dir}/android_lint_cache" |
| 15 depfile = "${_cache_dir}/prepare_android_lint_cache.d" |
| 16 _manifest_file = "//build/android/AndroidManifest.xml" |
| 17 _result_file = "${_cache_dir}/result.xml" |
| 18 script = "//build/android/gyp/lint.py" |
| 19 |
| 20 inputs = [ |
| 21 "${android_sdk_root}/platform-tools/api/api-versions.xml", |
| 22 ] |
| 23 outputs = [ |
| 24 depfile, |
| 25 ] |
| 26 args = [ |
| 27 "--build-tools-version", |
| 28 android_sdk_build_tools_version, |
| 29 "--cache-dir", |
| 30 rebase_path(_cache_dir, root_build_dir), |
| 31 "--depfile", |
| 32 rebase_path(depfile, root_build_dir), |
| 33 "--lint-path", |
| 34 "$rebased_android_sdk_root/tools/lint", |
| 35 "--manifest-path", |
| 36 rebase_path(_manifest_file, root_build_dir), |
| 37 "--product-dir", |
| 38 ".", |
| 39 "--result-path", |
| 40 rebase_path(_result_file, root_build_dir), |
| 41 "--silent", |
| 42 "--enable", |
| 43 ] |
| 44 } |
| 45 |
10 action("find_sun_tools_jar") { | 46 action("find_sun_tools_jar") { |
11 script = "//build/android/gyp/find_sun_tools_jar.py" | 47 script = "//build/android/gyp/find_sun_tools_jar.py" |
12 depfile = "$target_gen_dir/$target_name.d" | 48 depfile = "$target_gen_dir/$target_name.d" |
13 outputs = [ | 49 outputs = [ |
14 depfile, | 50 depfile, |
15 sun_tools_jar_path, | 51 sun_tools_jar_path, |
16 ] | 52 ] |
17 args = [ | 53 args = [ |
18 "--depfile", | 54 "--depfile", |
19 rebase_path(depfile, root_build_dir), | 55 rebase_path(depfile, root_build_dir), |
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
123 _target_name = get_path_info(script, "name") + "_wrapper" | 159 _target_name = get_path_info(script, "name") + "_wrapper" |
124 _wrapper_targets += [ ":$_target_name" ] | 160 _wrapper_targets += [ ":$_target_name" ] |
125 wrapper_script(_target_name) { | 161 wrapper_script(_target_name) { |
126 target = script | 162 target = script |
127 } | 163 } |
128 } | 164 } |
129 | 165 |
130 group("wrapper_scripts") { | 166 group("wrapper_scripts") { |
131 deps = _wrapper_targets | 167 deps = _wrapper_targets |
132 } | 168 } |
OLD | NEW |