Chromium Code Reviews| 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) | |
|
agrieve
2015/11/19 19:50:51
nit: rebased_apk_path -> _rebased_apk_path
jbudorick
2015/11/20 03:16:23
Done.
| |
| 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 _rebased_build_config = rebase_path(invoker.build_config, root_build_dir) |
| 1758 test_runner_args += [ | 1763 test_runner_args += [ |
| 1759 "--test-apk", | 1764 "--test-apk", |
| 1760 invoker.test_apk, | 1765 "@FileArg($_rebased_build_config:deps_info:apk_path)", |
| 1766 "--apk-under-test", | |
| 1767 "@FileArg($_rebased_build_config:deps_info:tested_apk_path)", | |
| 1761 ] | 1768 ] |
| 1762 } else { | 1769 } else { |
| 1763 assert(false, "Invalid test type: $_test_type.") | 1770 assert(false, "Invalid test type: $_test_type.") |
| 1764 } | 1771 } |
| 1765 | 1772 |
| 1766 if (defined(invoker.isolate_file)) { | 1773 if (defined(invoker.isolate_file)) { |
| 1767 test_runner_args += [ | 1774 test_runner_args += [ |
| 1768 "--isolate-file-path", | 1775 "--isolate-file-path", |
| 1769 rebase_path(invoker.isolate_file, root_build_dir), | 1776 rebase_path(invoker.isolate_file, root_build_dir), |
| 1770 ] | 1777 ] |
| (...skipping 16 matching lines...) Expand all Loading... | |
| 1787 ] | 1794 ] |
| 1788 args = [ | 1795 args = [ |
| 1789 "--depfile", | 1796 "--depfile", |
| 1790 rebase_path(depfile, root_build_dir), | 1797 rebase_path(depfile, root_build_dir), |
| 1791 "--script-output-path", | 1798 "--script-output-path", |
| 1792 rebase_path(generated_script, root_build_dir), | 1799 rebase_path(generated_script, root_build_dir), |
| 1793 ] | 1800 ] |
| 1794 args += test_runner_args | 1801 args += test_runner_args |
| 1795 } | 1802 } |
| 1796 } | 1803 } |
| OLD | NEW |