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

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

Issue 1108173002: Roll //build, //native_client, and a few more targets of opportunity. Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Test fix Created 5 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/config/android/config.gni ('k') | build/config/android/rules.gni » ('j') | 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 6
7 assert(is_android) 7 assert(is_android)
8 8
9 rebased_android_sdk = rebase_path(android_sdk, root_build_dir) 9 rebased_android_sdk = rebase_path(android_sdk, root_build_dir)
10 rebased_android_sdk_root = rebase_path(android_sdk_root, root_build_dir) 10 rebased_android_sdk_root = rebase_path(android_sdk_root, root_build_dir)
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 "--processed-config-path", 55 "--processed-config-path",
56 rebase_path(config_path, root_build_dir), 56 rebase_path(config_path, root_build_dir),
57 "--result-path", 57 "--result-path",
58 rebase_path(result_path, root_build_dir), 58 rebase_path(result_path, root_build_dir),
59 "--java-files=$rebased_java_files", 59 "--java-files=$rebased_java_files",
60 "--enable", 60 "--enable",
61 ] 61 ]
62 } 62 }
63 } 63 }
64 64
65 template("findbugs") {
66 jar_path = invoker.jar_path
67
68 build_config = invoker.build_config
69
70 action(target_name) {
71 script = "//build/android/findbugs_diff.py"
72 depfile = "$target_gen_dir/$target_name.d"
73 result_path = "$target_gen_dir/$target_name/result.xml"
74 exclusions_file = "//build/android/findbugs_filter/findbugs_exclude.xml"
75
76 rebased_build_config = rebase_path(build_config, root_build_dir)
77
78 inputs = [
79 "//build/android/pylib/utils/findbugs.py",
80 exclusions_file,
81 jar_path,
82 ]
83
84 outputs = [
85 depfile,
86 result_path,
87 ]
88
89 args = [
90 "--depfile",
91 rebase_path(depfile, root_build_dir),
92 "--exclude",
93 rebase_path(exclusions_file, root_build_dir),
94 "--auxclasspath-gyp",
95 "@FileArg($rebased_build_config:javac:classpath)",
96 "--output-file",
97 rebase_path(result_path, root_build_dir),
98 rebase_path(jar_path, root_build_dir),
99 ]
100 }
101 }
102
65 template("dex") { 103 template("dex") {
66 set_sources_assignment_filter([]) 104 set_sources_assignment_filter([])
67 if (defined(invoker.testonly)) { 105 if (defined(invoker.testonly)) {
68 testonly = invoker.testonly 106 testonly = invoker.testonly
69 } 107 }
70 108
71 assert(defined(invoker.output)) 109 assert(defined(invoker.output))
72 action(target_name) { 110 action(target_name) {
73 script = "//build/android/gyp/dex.py" 111 script = "//build/android/gyp/dex.py"
74 depfile = "$target_gen_dir/$target_name.d" 112 depfile = "$target_gen_dir/$target_name.d"
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 if (defined(invoker.deps)) { 219 if (defined(invoker.deps)) {
182 deps += invoker.deps 220 deps += invoker.deps
183 } 221 }
184 222
185 possible_deps_configs = [] 223 possible_deps_configs = []
186 foreach(d, deps) { 224 foreach(d, deps) {
187 dep_gen_dir = get_label_info(d, "target_gen_dir") 225 dep_gen_dir = get_label_info(d, "target_gen_dir")
188 dep_name = get_label_info(d, "name") 226 dep_name = get_label_info(d, "name")
189 possible_deps_configs += [ "$dep_gen_dir/$dep_name.build_config" ] 227 possible_deps_configs += [ "$dep_gen_dir/$dep_name.build_config" ]
190 } 228 }
191 rebase_possible_deps_configs = rebase_path(possible_deps_configs) 229 rebase_possible_deps_configs =
230 rebase_path(possible_deps_configs, root_build_dir)
192 231
193 outputs = [ 232 outputs = [
194 depfile, 233 depfile,
195 build_config, 234 build_config,
196 ] 235 ]
197 236
198 args = [ 237 args = [
199 "--type", 238 "--type",
200 type, 239 type,
201 "--depfile", 240 "--depfile",
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
243 args += [ "--supports-android" ] 282 args += [ "--supports-android" ]
244 } 283 }
245 if (requires_android) { 284 if (requires_android) {
246 args += [ "--requires-android" ] 285 args += [ "--requires-android" ]
247 } 286 }
248 if (defined(invoker.bypass_platform_checks) && 287 if (defined(invoker.bypass_platform_checks) &&
249 invoker.bypass_platform_checks) { 288 invoker.bypass_platform_checks) {
250 args += [ "--bypass-platform-checks" ] 289 args += [ "--bypass-platform-checks" ]
251 } 290 }
252 291
292 if (defined(invoker.apk_under_test)) {
293 deps += [ invoker.apk_under_test ]
294 apk_under_test_gen_dir =
295 get_label_info(invoker.apk_under_test, "target_gen_dir")
296 apk_under_test_name = get_label_info(invoker.apk_under_test, "name")
297 apk_under_test_config =
298 "$apk_under_test_gen_dir/$apk_under_test_name.build_config"
299 args += [
300 "--tested-apk-config",
301 rebase_path(apk_under_test_config, root_build_dir),
302 ]
303 }
304
253 if (is_android_resources || is_apk) { 305 if (is_android_resources || is_apk) {
254 assert(defined(invoker.resources_zip)) 306 assert(defined(invoker.resources_zip))
255 args += [ 307 args += [
256 "--resources-zip", 308 "--resources-zip",
257 rebase_path(invoker.resources_zip, root_build_dir), 309 rebase_path(invoker.resources_zip, root_build_dir),
258 ] 310 ]
259 if (defined(invoker.android_manifest)) { 311 if (defined(invoker.android_manifest)) {
260 inputs += [ invoker.android_manifest ] 312 inputs += [ invoker.android_manifest ]
261 args += [ 313 args += [
262 "--android-manifest", 314 "--android-manifest",
263 rebase_path(invoker.android_manifest, root_build_dir), 315 rebase_path(invoker.android_manifest, root_build_dir),
264 ] 316 ]
317 } else {
318 assert(!is_apk, "apk build configs require an android_manifest")
265 } 319 }
266 if (defined(invoker.custom_package)) { 320 if (defined(invoker.custom_package)) {
267 args += [ 321 args += [
268 "--package-name", 322 "--package-name",
269 invoker.custom_package, 323 invoker.custom_package,
270 ] 324 ]
271 } 325 }
272 } 326 }
273 327
274 if (is_apk) { 328 if (is_apk) {
(...skipping 632 matching lines...) Expand 10 before | Expand all | Expand 10 after
907 if (defined(invoker.android_manifest)) { 961 if (defined(invoker.android_manifest)) {
908 _android_manifest = invoker.android_manifest 962 _android_manifest = invoker.android_manifest
909 } 963 }
910 964
911 _final_datadeps += [ ":${_template_name}__lint" ] 965 _final_datadeps += [ ":${_template_name}__lint" ]
912 android_lint("${_template_name}__lint") { 966 android_lint("${_template_name}__lint") {
913 android_manifest = _android_manifest 967 android_manifest = _android_manifest
914 jar_path = _jar_path 968 jar_path = _jar_path
915 java_files = _java_files 969 java_files = _java_files
916 } 970 }
971
972 if (run_findbugs) {
973 _final_datadeps += [ ":${_template_name}__findbugs" ]
974 findbugs("${_template_name}__findbugs") {
975 build_config = _build_config
976 jar_path = _jar_path
977 }
978 }
917 } 979 }
918 980
919 _final_deps += [ ":${_template_name}__dex" ] 981 _final_deps += [ ":${_template_name}__dex" ]
920 dex("${_template_name}__dex") { 982 dex("${_template_name}__dex") {
921 sources = [ 983 sources = [
922 _jar_path, 984 _jar_path,
923 ] 985 ]
924 output = _dex_path 986 output = _dex_path
925 } 987 }
926 } 988 }
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
1092 ] 1154 ]
1093 output = invoker.dex_path 1155 output = invoker.dex_path
1094 dex_arg_key = "${rebased_build_config}:final_dex:dependency_dex_files" 1156 dex_arg_key = "${rebased_build_config}:final_dex:dependency_dex_files"
1095 args = [ "--inputs=@FileArg($dex_arg_key)" ] 1157 args = [ "--inputs=@FileArg($dex_arg_key)" ]
1096 if (defined(invoker.excluded_jars)) { 1158 if (defined(invoker.excluded_jars)) {
1097 excluded_jars = rebase_path(invoker.excluded_jars, root_build_dir) 1159 excluded_jars = rebase_path(invoker.excluded_jars, root_build_dir)
1098 args += [ "--excluded-paths=${excluded_jars}" ] 1160 args += [ "--excluded-paths=${excluded_jars}" ]
1099 } 1161 }
1100 } 1162 }
1101 } 1163 }
OLDNEW
« no previous file with comments | « build/config/android/config.gni ('k') | build/config/android/rules.gni » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698