OLD | NEW |
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/zip.gni") | 6 import("//build/config/zip.gni") |
7 import("//third_party/ijar/ijar.gni") | 7 import("//third_party/ijar/ijar.gni") |
8 | 8 |
9 assert(is_android) | 9 assert(is_android) |
10 | 10 |
(...skipping 471 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
482 template("package_apk") { | 482 template("package_apk") { |
483 action(target_name) { | 483 action(target_name) { |
484 forward_variables_from(invoker, | 484 forward_variables_from(invoker, |
485 [ | 485 [ |
486 "deps", | 486 "deps", |
487 "public_deps", | 487 "public_deps", |
488 "testonly", | 488 "testonly", |
489 ]) | 489 ]) |
490 script = "//build/android/gyp/apkbuilder.py" | 490 script = "//build/android/gyp/apkbuilder.py" |
491 depfile = "$target_gen_dir/$target_name.d" | 491 depfile = "$target_gen_dir/$target_name.d" |
492 data_deps = [ "//tools/android/md5sum" ] # Used when deploying APKs | 492 data_deps = [ |
| 493 "//tools/android/md5sum", |
| 494 ] # Used when deploying APKs |
493 | 495 |
494 inputs = [ | 496 inputs = [ |
495 invoker.resource_packaged_apk_path, | 497 invoker.resource_packaged_apk_path, |
496 ] | 498 ] |
497 if (defined(invoker.dex_path)) { | 499 if (defined(invoker.dex_path)) { |
498 inputs += [ invoker.dex_path ] | 500 inputs += [ invoker.dex_path ] |
499 } | 501 } |
500 | 502 |
501 outputs = [ | 503 outputs = [ |
502 depfile, | 504 depfile, |
(...skipping 673 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1176 _final_datadeps = [] | 1178 _final_datadeps = [] |
1177 if (defined(invoker.datadeps)) { | 1179 if (defined(invoker.datadeps)) { |
1178 _final_datadeps = invoker.datadeps | 1180 _final_datadeps = invoker.datadeps |
1179 } | 1181 } |
1180 | 1182 |
1181 _supports_android = | 1183 _supports_android = |
1182 defined(invoker.supports_android) && invoker.supports_android | 1184 defined(invoker.supports_android) && invoker.supports_android |
1183 _requires_android = | 1185 _requires_android = |
1184 defined(invoker.requires_android) && invoker.requires_android | 1186 defined(invoker.requires_android) && invoker.requires_android |
1185 assert(_requires_android || true) # Mark as used. | 1187 assert(_requires_android || true) # Mark as used. |
| 1188 _run_findbugs = defined(invoker.run_findbugs) && invoker.run_findbugs |
| 1189 assert(_run_findbugs || true) # Mark as used. |
1186 | 1190 |
1187 if (_supports_android) { | 1191 if (_supports_android) { |
1188 _dex_path = _base_path + ".dex.jar" | 1192 _dex_path = _base_path + ".dex.jar" |
1189 if (defined(invoker.dex_path)) { | 1193 if (defined(invoker.dex_path)) { |
1190 _dex_path = invoker.dex_path | 1194 _dex_path = invoker.dex_path |
1191 } | 1195 } |
1192 } | 1196 } |
1193 | 1197 |
1194 # Define build_config_deps which will be a list of targets required to | 1198 # Define build_config_deps which will be a list of targets required to |
1195 # build the _build_config. | 1199 # build the _build_config. |
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1315 jar_path = _jar_path | 1319 jar_path = _jar_path |
1316 java_files = _java_files | 1320 java_files = _java_files |
1317 deps = [ | 1321 deps = [ |
1318 ":$_compile_java_target", | 1322 ":$_compile_java_target", |
1319 ] | 1323 ] |
1320 if (defined(invoker.deps)) { | 1324 if (defined(invoker.deps)) { |
1321 deps += invoker.deps | 1325 deps += invoker.deps |
1322 } | 1326 } |
1323 } | 1327 } |
1324 | 1328 |
1325 if (defined(invoker.run_findbugs)) { | 1329 if (_run_findbugs) { |
1326 run_findbugs = invoker.run_findbugs | |
1327 } | |
1328 if (run_findbugs) { | |
1329 _final_datadeps += [ ":${_template_name}__findbugs" ] | 1330 _final_datadeps += [ ":${_template_name}__findbugs" ] |
1330 findbugs("${_template_name}__findbugs") { | 1331 findbugs("${_template_name}__findbugs") { |
1331 build_config = _build_config | 1332 build_config = _build_config |
1332 jar_path = _jar_path | 1333 jar_path = _jar_path |
1333 deps = [ | 1334 deps = [ |
1334 ":$_compile_java_target", | 1335 ":$_compile_java_target", |
1335 ] | 1336 ] |
1336 } | 1337 } |
1337 } | 1338 } |
1338 } | 1339 } |
(...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1635 ] | 1636 ] |
1636 args = [ | 1637 args = [ |
1637 "--depfile", | 1638 "--depfile", |
1638 rebase_path(depfile, root_build_dir), | 1639 rebase_path(depfile, root_build_dir), |
1639 "--script-output-path", | 1640 "--script-output-path", |
1640 rebase_path(generated_script, root_build_dir), | 1641 rebase_path(generated_script, root_build_dir), |
1641 ] | 1642 ] |
1642 args += test_runner_args | 1643 args += test_runner_args |
1643 } | 1644 } |
1644 } | 1645 } |
OLD | NEW |