Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(195)

Side by Side Diff: build/config/android/internal_rules.gni

Issue 1847823003: 🍫 Enable support-annotations lint checks (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lint-swiper
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« build/android/gyp/lint.py ('K') | « build/android/gyp/lint.py ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 rebase_path(_result_path, root_build_dir), 73 rebase_path(_result_path, root_build_dir),
74 "--enable", 74 "--enable",
75 ] 75 ]
76 76
77 if (defined(invoker.create_cache) && invoker.create_cache) { 77 if (defined(invoker.create_cache) && invoker.create_cache) {
78 args += [ 78 args += [
79 "--create-cache", 79 "--create-cache",
80 "--silent", 80 "--silent",
81 ] 81 ]
82 } else { 82 } else {
83 inputs += [ invoker.jar_path ] + invoker.java_files 83 _rebased_build_config = rebase_path(invoker.build_config, root_build_dir)
84 inputs += invoker.java_files
85 inputs += [
86 invoker.jar_path,
87 invoker.build_config,
88 ]
84 deps += [ "//build/android:prepare_android_lint_cache" ] 89 deps += [ "//build/android:prepare_android_lint_cache" ]
85 _rebased_java_files = rebase_path(invoker.java_files, root_build_dir) 90 _rebased_java_files = rebase_path(invoker.java_files, root_build_dir)
86 args += [ 91 args += [
87 "--jar-path", 92 "--jar-path",
88 rebase_path(invoker.jar_path, root_build_dir), 93 rebase_path(invoker.jar_path, root_build_dir),
89 "--java-files=$_rebased_java_files", 94 "--java-files=$_rebased_java_files",
95 "--classpath=@FileArg($_rebased_build_config:javac:classpath)",
90 ] 96 ]
91 } 97 }
92 } 98 }
93 } 99 }
94 100
95 template("proguard") { 101 template("proguard") {
96 action(target_name) { 102 action(target_name) {
97 set_sources_assignment_filter([]) 103 set_sources_assignment_filter([])
98 forward_variables_from(invoker, 104 forward_variables_from(invoker,
99 [ 105 [
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 if (proguard_verbose) { 147 if (proguard_verbose) {
142 args += [ "--verbose" ] 148 args += [ "--verbose" ]
143 } 149 }
144 if (defined(invoker.args)) { 150 if (defined(invoker.args)) {
145 args += invoker.args 151 args += invoker.args
146 } 152 }
147 } 153 }
148 } 154 }
149 155
150 template("findbugs") { 156 template("findbugs") {
151 jar_path = invoker.jar_path
152
153 build_config = invoker.build_config
154
155 action(target_name) { 157 action(target_name) {
156 forward_variables_from(invoker, 158 forward_variables_from(invoker,
157 [ 159 [
158 "deps", 160 "deps",
159 "testonly", 161 "testonly",
160 ]) 162 ])
161 script = "//build/android/findbugs_diff.py" 163 script = "//build/android/findbugs_diff.py"
162 depfile = "$target_gen_dir/$target_name.d" 164 depfile = "$target_gen_dir/$target_name.d"
163 result_path = "$target_gen_dir/$target_name/result.xml" 165 _result_path = "$target_gen_dir/$target_name/result.xml"
164 exclusions_file = "//build/android/findbugs_filter/findbugs_exclude.xml" 166 _exclusions_file = "//build/android/findbugs_filter/findbugs_exclude.xml"
165 167
166 rebased_build_config = rebase_path(build_config, root_build_dir) 168 _rebased_build_config = rebase_path(invoker.build_config, root_build_dir)
167 169
168 inputs = [ 170 inputs = [
169 "//build/android/pylib/utils/findbugs.py", 171 "//build/android/pylib/utils/findbugs.py",
170 exclusions_file, 172 _exclusions_file,
171 jar_path, 173 invoker.jar_path,
174 invoker.build_config,
172 ] 175 ]
173 176
174 outputs = [ 177 outputs = [
175 depfile, 178 depfile,
176 result_path, 179 _result_path,
177 ] 180 ]
178 181
179 args = [ 182 args = [
180 "--depfile", 183 "--depfile",
181 rebase_path(depfile, root_build_dir), 184 rebase_path(depfile, root_build_dir),
182 "--exclude", 185 "--exclude",
183 rebase_path(exclusions_file, root_build_dir), 186 rebase_path(_exclusions_file, root_build_dir),
184 "--auxclasspath-gyp", 187 "--auxclasspath-gyp",
185 "@FileArg($rebased_build_config:javac:classpath)", 188 "@FileArg($_rebased_build_config:javac:classpath)",
186 "--output-file", 189 "--output-file",
187 rebase_path(result_path, root_build_dir), 190 rebase_path(_result_path, root_build_dir),
188 rebase_path(jar_path, root_build_dir), 191 rebase_path(invoker.jar_path, root_build_dir),
189 ] 192 ]
190 193
191 if (findbugs_verbose) { 194 if (findbugs_verbose) {
192 args += [ "-vv" ] 195 args += [ "-vv" ]
193 } 196 }
194 } 197 }
195 } 198 }
196 199
197 # Generates a script in the output bin.java directory to run a java binary. 200 # Generates a script in the output bin.java directory to run a java binary.
198 # 201 #
(...skipping 1526 matching lines...) Expand 10 before | Expand all | Expand 10 after
1725 } 1728 }
1726 deps = build_config_deps 1729 deps = build_config_deps
1727 } 1730 }
1728 } 1731 }
1729 1732
1730 if (_supports_android) { 1733 if (_supports_android) {
1731 if (_chromium_code) { 1734 if (_chromium_code) {
1732 _final_datadeps += [ ":${_template_name}__lint" ] 1735 _final_datadeps += [ ":${_template_name}__lint" ]
1733 android_lint("${_template_name}__lint") { 1736 android_lint("${_template_name}__lint") {
1734 android_manifest = _android_manifest 1737 android_manifest = _android_manifest
1738 build_config = _build_config
1735 jar_path = _jar_path 1739 jar_path = _jar_path
1736 java_files = _java_files 1740 java_files = _java_files
1737 deps = [ 1741 deps = build_config_deps + [ ":$_compile_java_target" ]
1738 ":$_compile_java_target",
1739 ]
1740 if (defined(invoker.deps)) { 1742 if (defined(invoker.deps)) {
1741 deps += invoker.deps 1743 deps += invoker.deps
1742 } 1744 }
1743 } 1745 }
1744 1746
1745 if (_run_findbugs) { 1747 if (_run_findbugs) {
1746 _final_datadeps += [ ":${_template_name}__findbugs" ] 1748 _final_datadeps += [ ":${_template_name}__findbugs" ]
1747 findbugs("${_template_name}__findbugs") { 1749 findbugs("${_template_name}__findbugs") {
1748 build_config = _build_config 1750 build_config = _build_config
1749 jar_path = _jar_path 1751 jar_path = _jar_path
1750 deps = [ 1752 deps = build_config_deps + [ ":$_compile_java_target" ]
1751 ":$_compile_java_target",
1752 ]
1753 } 1753 }
1754 } 1754 }
1755 } 1755 }
1756 1756
1757 _final_deps += [ ":${_template_name}__dex" ] 1757 _final_deps += [ ":${_template_name}__dex" ]
1758 dex("${_template_name}__dex") { 1758 dex("${_template_name}__dex") {
1759 sources = [ 1759 sources = [
1760 _jar_path, 1760 _jar_path,
1761 ] 1761 ]
1762 output = _dex_path 1762 output = _dex_path
(...skipping 412 matching lines...) Expand 10 before | Expand all | Expand 10 after
2175 ] 2175 ]
2176 args = [ 2176 args = [
2177 "--depfile", 2177 "--depfile",
2178 rebase_path(depfile, root_build_dir), 2178 rebase_path(depfile, root_build_dir),
2179 "--script-output-path", 2179 "--script-output-path",
2180 rebase_path(generated_script, root_build_dir), 2180 rebase_path(generated_script, root_build_dir),
2181 ] 2181 ]
2182 args += test_runner_args 2182 args += test_runner_args
2183 } 2183 }
2184 } 2184 }
OLDNEW
« build/android/gyp/lint.py ('K') | « build/android/gyp/lint.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698