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

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: add android.jar, revert .gypi change 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
« no previous file with comments | « build/android/lint/suppressions.xml ('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 inputs += invoker.java_files
84 inputs += [
85 invoker.jar_path,
86 invoker.build_config,
87 ]
84 deps += [ "//build/android:prepare_android_lint_cache" ] 88 deps += [ "//build/android:prepare_android_lint_cache" ]
85 _rebased_java_files = rebase_path(invoker.java_files, root_build_dir) 89 _rebased_java_files = rebase_path(invoker.java_files, root_build_dir)
90 _rebased_build_config = rebase_path(invoker.build_config, 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=['$rebased_android_sdk_jar']",
96 "--classpath=@FileArg($_rebased_build_config:javac:interface_classpath)" ,
90 ] 97 ]
91 } 98 }
92 } 99 }
93 } 100 }
94 101
95 template("proguard") { 102 template("proguard") {
96 action(target_name) { 103 action(target_name) {
97 set_sources_assignment_filter([]) 104 set_sources_assignment_filter([])
98 forward_variables_from(invoker, 105 forward_variables_from(invoker,
99 [ 106 [
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 if (proguard_verbose) { 148 if (proguard_verbose) {
142 args += [ "--verbose" ] 149 args += [ "--verbose" ]
143 } 150 }
144 if (defined(invoker.args)) { 151 if (defined(invoker.args)) {
145 args += invoker.args 152 args += invoker.args
146 } 153 }
147 } 154 }
148 } 155 }
149 156
150 template("findbugs") { 157 template("findbugs") {
151 jar_path = invoker.jar_path
152
153 build_config = invoker.build_config
154
155 action(target_name) { 158 action(target_name) {
156 forward_variables_from(invoker, 159 forward_variables_from(invoker,
157 [ 160 [
158 "deps", 161 "deps",
159 "testonly", 162 "testonly",
160 ]) 163 ])
161 script = "//build/android/findbugs_diff.py" 164 script = "//build/android/findbugs_diff.py"
162 depfile = "$target_gen_dir/$target_name.d" 165 depfile = "$target_gen_dir/$target_name.d"
163 result_path = "$target_gen_dir/$target_name/result.xml" 166 _result_path = "$target_gen_dir/$target_name/result.xml"
164 exclusions_file = "//build/android/findbugs_filter/findbugs_exclude.xml" 167 _exclusions_file = "//build/android/findbugs_filter/findbugs_exclude.xml"
165 168
166 rebased_build_config = rebase_path(build_config, root_build_dir) 169 _rebased_build_config = rebase_path(invoker.build_config, root_build_dir)
167 170
168 inputs = [ 171 inputs = [
169 "//build/android/pylib/utils/findbugs.py", 172 "//build/android/pylib/utils/findbugs.py",
170 exclusions_file, 173 _exclusions_file,
171 jar_path, 174 invoker.jar_path,
175 invoker.build_config,
172 ] 176 ]
173 177
174 outputs = [ 178 outputs = [
175 depfile, 179 depfile,
176 result_path, 180 _result_path,
177 ] 181 ]
178 182
179 args = [ 183 args = [
180 "--depfile", 184 "--depfile",
181 rebase_path(depfile, root_build_dir), 185 rebase_path(depfile, root_build_dir),
182 "--exclude", 186 "--exclude",
183 rebase_path(exclusions_file, root_build_dir), 187 rebase_path(_exclusions_file, root_build_dir),
184 "--auxclasspath-gyp", 188 "--auxclasspath-gyp",
185 "@FileArg($rebased_build_config:javac:classpath)", 189 "@FileArg($_rebased_build_config:javac:classpath)",
186 "--output-file", 190 "--output-file",
187 rebase_path(result_path, root_build_dir), 191 rebase_path(_result_path, root_build_dir),
188 rebase_path(jar_path, root_build_dir), 192 rebase_path(invoker.jar_path, root_build_dir),
189 ] 193 ]
190 194
191 if (findbugs_verbose) { 195 if (findbugs_verbose) {
192 args += [ "-vv" ] 196 args += [ "-vv" ]
193 } 197 }
194 } 198 }
195 } 199 }
196 200
197 # Generates a script in the output bin.java directory to run a java binary. 201 # Generates a script in the output bin.java directory to run a java binary.
198 # 202 #
(...skipping 1522 matching lines...) Expand 10 before | Expand all | Expand 10 after
1721 } 1725 }
1722 deps = build_config_deps 1726 deps = build_config_deps
1723 } 1727 }
1724 } 1728 }
1725 1729
1726 if (_supports_android) { 1730 if (_supports_android) {
1727 if (_chromium_code) { 1731 if (_chromium_code) {
1728 _final_datadeps += [ ":${_template_name}__lint" ] 1732 _final_datadeps += [ ":${_template_name}__lint" ]
1729 android_lint("${_template_name}__lint") { 1733 android_lint("${_template_name}__lint") {
1730 android_manifest = _android_manifest 1734 android_manifest = _android_manifest
1735 build_config = _build_config
1731 jar_path = _jar_path 1736 jar_path = _jar_path
1732 java_files = _java_files 1737 java_files = _java_files
1733 deps = [ 1738 deps = build_config_deps + [ ":$_compile_java_target" ]
1734 ":$_compile_java_target",
1735 ]
1736 if (defined(invoker.deps)) { 1739 if (defined(invoker.deps)) {
1737 deps += invoker.deps 1740 deps += invoker.deps
1738 } 1741 }
1739 } 1742 }
1740 1743
1741 if (_run_findbugs) { 1744 if (_run_findbugs) {
1742 _final_datadeps += [ ":${_template_name}__findbugs" ] 1745 _final_datadeps += [ ":${_template_name}__findbugs" ]
1743 findbugs("${_template_name}__findbugs") { 1746 findbugs("${_template_name}__findbugs") {
1744 build_config = _build_config 1747 build_config = _build_config
1745 jar_path = _jar_path 1748 jar_path = _jar_path
1746 deps = [ 1749 deps = build_config_deps + [ ":$_compile_java_target" ]
1747 ":$_compile_java_target",
1748 ]
1749 } 1750 }
1750 } 1751 }
1751 } 1752 }
1752 1753
1753 _final_deps += [ ":${_template_name}__dex" ] 1754 _final_deps += [ ":${_template_name}__dex" ]
1754 dex("${_template_name}__dex") { 1755 dex("${_template_name}__dex") {
1755 sources = [ 1756 sources = [
1756 _jar_path, 1757 _jar_path,
1757 ] 1758 ]
1758 output = _dex_path 1759 output = _dex_path
(...skipping 422 matching lines...) Expand 10 before | Expand all | Expand 10 after
2181 ] 2182 ]
2182 args = [ 2183 args = [
2183 "--depfile", 2184 "--depfile",
2184 rebase_path(depfile, root_build_dir), 2185 rebase_path(depfile, root_build_dir),
2185 "--script-output-path", 2186 "--script-output-path",
2186 rebase_path(generated_script, root_build_dir), 2187 rebase_path(generated_script, root_build_dir),
2187 ] 2188 ]
2188 args += test_runner_args 2189 args += test_runner_args
2189 } 2190 }
2190 } 2191 }
OLDNEW
« no previous file with comments | « build/android/lint/suppressions.xml ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698