| 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/config.gni") | 5 import("//build/config/android/config.gni") |
| 6 import("//build/config/sanitizers/sanitizers.gni") | 6 import("//build/config/sanitizers/sanitizers.gni") |
| 7 import("//build/config/zip.gni") | 7 import("//build/config/zip.gni") |
| 8 import("//third_party/ijar/ijar.gni") | 8 import("//third_party/ijar/ijar.gni") |
| 9 | 9 |
| 10 assert(is_android) | 10 assert(is_android) |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 | 25 |
| 26 template("android_lint") { | 26 template("android_lint") { |
| 27 set_sources_assignment_filter([]) | 27 set_sources_assignment_filter([]) |
| 28 | 28 |
| 29 jar_path = invoker.jar_path | 29 jar_path = invoker.jar_path |
| 30 android_manifest = invoker.android_manifest | 30 android_manifest = invoker.android_manifest |
| 31 java_files = invoker.java_files | 31 java_files = invoker.java_files |
| 32 base_path = "$target_gen_dir/$target_name" | 32 base_path = "$target_gen_dir/$target_name" |
| 33 | 33 |
| 34 action(target_name) { | 34 action(target_name) { |
| 35 deps = [] |
| 35 forward_variables_from(invoker, | 36 forward_variables_from(invoker, |
| 36 [ | 37 [ |
| 37 "deps", | 38 "deps", |
| 38 "data_deps", | 39 "data_deps", |
| 39 "public_deps", | 40 "public_deps", |
| 40 "testonly", | 41 "testonly", |
| 41 ]) | 42 ]) |
| 42 script = "//build/android/gyp/lint.py" | 43 script = "//build/android/gyp/lint.py" |
| 43 result_path = base_path + "/result.xml" | 44 result_path = base_path + "/result.xml" |
| 44 config_path = base_path + "/config.xml" | 45 config_path = base_path + "/config.xml" |
| 45 suppressions_file = "//build/android/lint/suppressions.xml" | 46 suppressions_file = "//build/android/lint/suppressions.xml" |
| 46 inputs = [ | 47 inputs = [ |
| 47 suppressions_file, | 48 suppressions_file, |
| 48 android_manifest, | 49 android_manifest, |
| 49 jar_path, | 50 jar_path, |
| 50 ] + java_files | 51 ] + java_files |
| 51 | 52 |
| 52 outputs = [ | 53 outputs = [ |
| 53 config_path, | 54 config_path, |
| 54 result_path, | 55 result_path, |
| 55 ] | 56 ] |
| 56 | 57 |
| 58 deps += [ "//build/android:prepare_android_lint_cache" ] |
| 59 |
| 57 rebased_java_files = rebase_path(java_files, root_build_dir) | 60 rebased_java_files = rebase_path(java_files, root_build_dir) |
| 58 | 61 |
| 59 args = [ | 62 args = [ |
| 60 "--lint-path=$rebased_android_sdk_root/tools/lint", | 63 "--lint-path=$rebased_android_sdk_root/tools/lint", |
| 61 "--config-path", | 64 "--config-path", |
| 62 rebase_path(suppressions_file, root_build_dir), | 65 rebase_path(suppressions_file, root_build_dir), |
| 63 "--manifest-path", | 66 "--manifest-path", |
| 64 rebase_path(android_manifest, root_build_dir), | 67 rebase_path(android_manifest, root_build_dir), |
| 65 "--product-dir=.", | 68 "--product-dir=.", |
| 66 "--jar-path", | 69 "--jar-path", |
| (...skipping 2100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2167 ] | 2170 ] |
| 2168 args = [ | 2171 args = [ |
| 2169 "--depfile", | 2172 "--depfile", |
| 2170 rebase_path(depfile, root_build_dir), | 2173 rebase_path(depfile, root_build_dir), |
| 2171 "--script-output-path", | 2174 "--script-output-path", |
| 2172 rebase_path(generated_script, root_build_dir), | 2175 rebase_path(generated_script, root_build_dir), |
| 2173 ] | 2176 ] |
| 2174 args += test_runner_args | 2177 args += test_runner_args |
| 2175 } | 2178 } |
| 2176 } | 2179 } |
| OLD | NEW |