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 434 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
445 ] | 445 ] |
446 } | 446 } |
447 | 447 |
448 if (defined(invoker.proguard_enabled) && invoker.proguard_enabled) { | 448 if (defined(invoker.proguard_enabled) && invoker.proguard_enabled) { |
449 args += [ | 449 args += [ |
450 "--proguard-enabled", | 450 "--proguard-enabled", |
451 "--proguard-info", | 451 "--proguard-info", |
452 rebase_path(invoker.proguard_info, root_build_dir), | 452 rebase_path(invoker.proguard_info, root_build_dir), |
453 ] | 453 ] |
454 } | 454 } |
| 455 |
| 456 if (defined(invoker.apk_path)) { |
| 457 _rebased_apk_path = rebase_path(invoker.apk_path, root_build_dir) |
| 458 args += [ "--apk-path=$_rebased_apk_path" ] |
| 459 } |
455 } | 460 } |
456 | 461 |
457 if (defined(invoker.srcjar)) { | 462 if (defined(invoker.srcjar)) { |
458 args += [ | 463 args += [ |
459 "--srcjar", | 464 "--srcjar", |
460 rebase_path(invoker.srcjar, root_build_dir), | 465 rebase_path(invoker.srcjar, root_build_dir), |
461 ] | 466 ] |
462 } | 467 } |
463 } | 468 } |
464 } | 469 } |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
523 input_jar = _output_jar_path | 528 input_jar = _output_jar_path |
524 output_jar = _output_ijar_path | 529 output_jar = _output_ijar_path |
525 deps = [ | 530 deps = [ |
526 ":$_output_jar_target", | 531 ":$_output_jar_target", |
527 ] | 532 ] |
528 } | 533 } |
529 | 534 |
530 group(target_name) { | 535 group(target_name) { |
531 forward_variables_from(invoker, [ "visibility" ]) | 536 forward_variables_from(invoker, [ "visibility" ]) |
532 public_deps = [ | 537 public_deps = [ |
| 538 ":$_output_jar_target", |
533 ":${target_name}__ijar", | 539 ":${target_name}__ijar", |
534 ":$_output_jar_target", | |
535 ] | 540 ] |
536 } | 541 } |
537 } | 542 } |
538 | 543 |
539 # Creates an unsigned .apk. | 544 # Creates an unsigned .apk. |
540 # | 545 # |
541 # Variables | 546 # Variables |
542 # assets_build_config: Path to android_apk .build_config containing merged | 547 # assets_build_config: Path to android_apk .build_config containing merged |
543 # asset information. | 548 # asset information. |
544 # deps: Specifies the dependencies of this target. | 549 # deps: Specifies the dependencies of this target. |
(...skipping 1202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1747 "--output-directory", | 1752 "--output-directory", |
1748 rebase_path(root_build_dir, root_build_dir), | 1753 rebase_path(root_build_dir, root_build_dir), |
1749 ] | 1754 ] |
1750 if (_test_type == "gtest") { | 1755 if (_test_type == "gtest") { |
1751 assert(defined(invoker.test_suite)) | 1756 assert(defined(invoker.test_suite)) |
1752 test_runner_args += [ | 1757 test_runner_args += [ |
1753 "--suite", | 1758 "--suite", |
1754 invoker.test_suite, | 1759 invoker.test_suite, |
1755 ] | 1760 ] |
1756 } else if (_test_type == "instrumentation") { | 1761 } else if (_test_type == "instrumentation") { |
1757 assert(defined(invoker.test_apk)) | 1762 deps = [ |
| 1763 "${invoker.apk_target}__build_config", |
| 1764 ] |
| 1765 _build_config = |
| 1766 get_label_info(invoker.apk_target, "target_gen_dir") + "/" + |
| 1767 get_label_info(invoker.apk_target, "name") + ".build_config" |
| 1768 _rebased_build_config = rebase_path(_build_config, root_build_dir) |
1758 test_runner_args += [ | 1769 test_runner_args += [ |
1759 "--test-apk", | 1770 "--test-apk", |
1760 invoker.test_apk, | 1771 "@FileArg($_rebased_build_config:deps_info:apk_path)", |
| 1772 "--apk-under-test", |
| 1773 "@FileArg($_rebased_build_config:deps_info:tested_apk_path)", |
1761 ] | 1774 ] |
1762 } else { | 1775 } else { |
1763 assert(false, "Invalid test type: $_test_type.") | 1776 assert(false, "Invalid test type: $_test_type.") |
1764 } | 1777 } |
1765 | 1778 |
1766 if (defined(invoker.isolate_file)) { | 1779 if (defined(invoker.isolate_file)) { |
1767 test_runner_args += [ | 1780 test_runner_args += [ |
1768 "--isolate-file-path", | 1781 "--isolate-file-path", |
1769 rebase_path(invoker.isolate_file, root_build_dir), | 1782 rebase_path(invoker.isolate_file, root_build_dir), |
1770 ] | 1783 ] |
(...skipping 16 matching lines...) Expand all Loading... |
1787 ] | 1800 ] |
1788 args = [ | 1801 args = [ |
1789 "--depfile", | 1802 "--depfile", |
1790 rebase_path(depfile, root_build_dir), | 1803 rebase_path(depfile, root_build_dir), |
1791 "--script-output-path", | 1804 "--script-output-path", |
1792 rebase_path(generated_script, root_build_dir), | 1805 rebase_path(generated_script, root_build_dir), |
1793 ] | 1806 ] |
1794 args += test_runner_args | 1807 args += test_runner_args |
1795 } | 1808 } |
1796 } | 1809 } |
OLD | NEW |