• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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
3# found in the LICENSE file.
4
5# This file is meant to be included into an action to provide a rule to
6# run lint on java/class files.
7
8{
9  'action_name': 'lint_<(_target_name)',
10  'message': 'Linting <(_target_name)',
11  'variables': {
12    'conditions': [
13      ['chromium_code != 0 and android_lint != 0 and never_lint == 0', {
14        'additional_args': ['--enable'],
15      }, {
16        'additional_args': [],
17      }]
18    ],
19    'android_lint_cache_stamp': '<(PRODUCT_DIR)/android_lint_cache/android_lint_cache.stamp',
20    'android_manifest_path%': '<(DEPTH)/build/android/AndroidManifest.xml',
21    'resource_dir%': '<(DEPTH)/build/android/ant/empty/res',
22    'suppressions_file%': '<(DEPTH)/build/android/lint/suppressions.xml',
23    'platform_xml_path': '<(android_sdk_root)/platform-tools/api/api-versions.xml',
24  },
25  'inputs': [
26    '<(DEPTH)/build/android/gyp/util/build_utils.py',
27    '<(DEPTH)/build/android/gyp/lint.py',
28    '<(android_lint_cache_stamp)',
29    '<(android_manifest_path)',
30    '<(lint_jar_path)',
31    '<(suppressions_file)',
32    '<(platform_xml_path)',
33  ],
34  'action': [
35    'python', '<(DEPTH)/build/android/gyp/lint.py',
36    '--lint-path=<(android_sdk_root)/tools/lint',
37    '--config-path=<(suppressions_file)',
38    '--processed-config-path=<(config_path)',
39    '--cache-dir', '<(PRODUCT_DIR)/android_lint_cache',
40    '--platform-xml-path', '<(platform_xml_path)',
41    '--manifest-path=<(android_manifest_path)',
42    '--result-path=<(result_path)',
43    '--resource-dir=<(resource_dir)',
44    '--product-dir=<(PRODUCT_DIR)',
45    '--src-dirs=>(src_dirs)',
46    '--jar-path=<(lint_jar_path)',
47    '--can-fail-build',
48    '--stamp=<(stamp_path)',
49    '<@(additional_args)',
50  ],
51}
52