OLD | NEW |
1 # Copyright 2013 The Chromium Authors. All rights reserved. | 1 # Copyright 2013 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 # This file is meant to be included into an action to provide a rule to | 5 # This file is meant to be included into an action to provide a rule to |
6 # run lint on java/class files. | 6 # run lint on java/class files. |
7 | 7 |
8 { | 8 { |
9 'action_name': 'lint_<(_target_name)', | 9 'action_name': 'lint_<(_target_name)', |
10 'message': 'Linting <(_target_name)', | 10 'message': 'Linting <(_target_name)', |
11 'variables': { | 11 'variables': { |
12 'conditions': [ | 12 'conditions': [ |
13 ['chromium_code != 0 and android_lint != 0 and never_lint == 0', { | 13 ['chromium_code != 0 and android_lint != 0 and never_lint == 0', { |
14 'is_enabled': '--enable', | 14 'additional_args': ['--enable'], |
15 }, { | 15 }, { |
16 'is_enabled': '', | 16 'additional_args': [], |
17 }] | 17 }] |
18 ], | 18 ], |
19 'android_manifest_path%': '<(DEPTH)/build/android/AndroidManifest.xml', | 19 'android_manifest_path%': '<(DEPTH)/build/android/AndroidManifest.xml', |
20 'resource_dir%': '<(DEPTH)/build/android/ant/empty/res', | 20 'resource_dir%': '<(DEPTH)/build/android/ant/empty/res', |
21 'suppressions_file%': '<(DEPTH)/build/android/lint/suppressions.xml', | 21 'suppressions_file%': '<(DEPTH)/build/android/lint/suppressions.xml', |
22 }, | 22 }, |
23 'inputs': [ | 23 'inputs': [ |
24 '<(DEPTH)/build/android/gyp/util/build_utils.py', | 24 '<(DEPTH)/build/android/gyp/util/build_utils.py', |
25 '<(DEPTH)/build/android/gyp/lint.py', | 25 '<(DEPTH)/build/android/gyp/lint.py', |
26 '<(android_manifest_path)', | 26 '<(android_manifest_path)', |
| 27 '<(lint_jar_path)', |
27 '<(suppressions_file)', | 28 '<(suppressions_file)', |
28 '<(lint_jar_path)', | |
29 ], | 29 ], |
30 'action': [ | 30 'action': [ |
31 'python', '<(DEPTH)/build/android/gyp/lint.py', | 31 'python', '<(DEPTH)/build/android/gyp/lint.py', |
32 '--lint-path=<(android_sdk_root)/tools/lint', | 32 '--lint-path=<(android_sdk_root)/tools/lint', |
33 '--config-path=<(suppressions_file)', | 33 '--config-path=<(suppressions_file)', |
34 '--processed-config-path=<(config_path)', | 34 '--processed-config-path=<(config_path)', |
| 35 '--cache-dir', '<(PRODUCT_DIR)/lint_cache', |
| 36 '--build-tools-version', '<(android_sdk_build_tools_version)', |
35 '--manifest-path=<(android_manifest_path)', | 37 '--manifest-path=<(android_manifest_path)', |
36 '--result-path=<(result_path)', | 38 '--result-path=<(result_path)', |
37 '--resource-dir=<(resource_dir)', | 39 '--resource-dir=<(resource_dir)', |
38 '--product-dir=<(PRODUCT_DIR)', | 40 '--product-dir=<(PRODUCT_DIR)', |
39 '--src-dirs=>(src_dirs)', | 41 '--src-dirs=>(src_dirs)', |
40 '--jar-path=<(lint_jar_path)', | 42 '--jar-path=<(lint_jar_path)', |
41 '--can-fail-build', | 43 '--can-fail-build', |
42 '--stamp=<(stamp_path)', | 44 '--stamp=<(stamp_path)', |
43 '<(is_enabled)', | 45 '<@(additional_args)', |
44 ], | 46 ], |
45 } | 47 } |
OLD | NEW |