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("//base/android/linker/config.gni") | 5 import("//base/android/linker/config.gni") |
6 import("//build/config/android/config.gni") | 6 import("//build/config/android/config.gni") |
7 import("//build/config/android/internal_rules.gni") | 7 import("//build/config/android/internal_rules.gni") |
8 import("//build/config/sanitizers/sanitizers.gni") | 8 import("//build/config/sanitizers/sanitizers.gni") |
9 import("//build/toolchain/toolchain.gni") | 9 import("//build/toolchain/toolchain.gni") |
10 import("//third_party/android_platform/config.gni") | 10 import("//third_party/android_platform/config.gni") |
(...skipping 1539 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1550 java_files = [] | 1550 java_files = [] |
1551 } | 1551 } |
1552 srcjar_deps = _srcjar_deps | 1552 srcjar_deps = _srcjar_deps |
1553 jar_path = _jar_path | 1553 jar_path = _jar_path |
1554 dex_path = _lib_dex_path | 1554 dex_path = _lib_dex_path |
1555 emma_never_instrument = _emma_never_instrument | 1555 emma_never_instrument = _emma_never_instrument |
1556 | 1556 |
1557 if (defined(invoker.deps)) { | 1557 if (defined(invoker.deps)) { |
1558 deps += invoker.deps | 1558 deps += invoker.deps |
1559 } | 1559 } |
| 1560 if (defined(invoker.apk_under_test)) { |
| 1561 deps += [ "${invoker.apk_under_test}__java" ] |
| 1562 } |
1560 } | 1563 } |
1561 | 1564 |
1562 # TODO(cjhopman): This is only ever needed to calculate the list of tests to | 1565 # TODO(cjhopman): This is only ever needed to calculate the list of tests to |
1563 # run. See build/android/pylib/instrumentation/test_jar.py. We should be | 1566 # run. See build/android/pylib/instrumentation/test_jar.py. We should be |
1564 # able to just do that calculation at build time instead. | 1567 # able to just do that calculation at build time instead. |
1565 if (defined(invoker.create_dist_ijar) && invoker.create_dist_ijar) { | 1568 if (defined(invoker.create_dist_ijar) && invoker.create_dist_ijar) { |
1566 _dist_ijar_path = "$root_build_dir/test.lib.java/" + | 1569 _dist_ijar_path = "$root_build_dir/test.lib.java/" + |
1567 get_path_info(_final_apk_path, "name") + ".jar" | 1570 get_path_info(_final_apk_path, "name") + ".jar" |
1568 action("${_template_name}_dist_ijar") { | 1571 action("${_template_name}_dist_ijar") { |
1569 script = "//build/android/gyp/create_dist_jar.py" | 1572 script = "//build/android/gyp/create_dist_jar.py" |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1605 ":$build_config_target", | 1608 ":$build_config_target", |
1606 ":$java_target", | 1609 ":$java_target", |
1607 ":$process_resources_target", | 1610 ":$process_resources_target", |
1608 ] | 1611 ] |
1609 inputs = [ | 1612 inputs = [ |
1610 _build_config, | 1613 _build_config, |
1611 _jar_path, | 1614 _jar_path, |
1612 ] + _proguard_configs | 1615 ] + _proguard_configs |
1613 | 1616 |
1614 output_jar_path = _proguard_jar_path | 1617 output_jar_path = _proguard_jar_path |
1615 rebased_proguard_configs = rebase_path(_proguard_configs, root_build_dir) | 1618 _rebased_proguard_configs = rebase_path(_proguard_configs, root_build_dir) |
1616 args = [ | 1619 args = [ |
1617 "--proguard-configs=$rebased_proguard_configs", | 1620 "--proguard-configs=$_rebased_proguard_configs", |
1618 "--tested-apk-info=@FileArg($_rebased_build_config:proguard:tested_apk_i
nfo)", | |
1619 "--input-paths=@FileArg($_rebased_build_config:proguard:input_paths)", | 1621 "--input-paths=@FileArg($_rebased_build_config:proguard:input_paths)", |
1620 ] | 1622 ] |
| 1623 if (defined(invoker.apk_under_test)) { |
| 1624 deps += [ |
| 1625 "${invoker.apk_under_test}__build_config", |
| 1626 "${invoker.apk_under_test}__proguard", |
| 1627 ] |
| 1628 _apk_under_test_build_config = |
| 1629 get_label_info(invoker.apk_under_test, "target_gen_dir") + "/" + |
| 1630 get_label_info(invoker.apk_under_test, "name") + ".build_config" |
| 1631 _rebased_apk_under_test_build_config = |
| 1632 rebase_path(_apk_under_test_build_config, root_build_dir) |
| 1633 args += [ "--tested-apk-info=@FileArg($_rebased_apk_under_test_build_con
fig:deps_info:proguard_info)" ] |
| 1634 } |
1621 } | 1635 } |
1622 _dex_sources = [ _proguard_jar_path ] | 1636 _dex_sources = [ _proguard_jar_path ] |
1623 _dex_deps = [ ":$_proguard_target" ] | 1637 _dex_deps = [ ":$_proguard_target" ] |
1624 } else { | 1638 } else { |
1625 if (enable_multidex) { | 1639 if (enable_multidex) { |
1626 _dex_sources = [ _jar_path ] | 1640 _dex_sources = [ _jar_path ] |
1627 } else { | 1641 } else { |
1628 _dex_sources = [ _lib_dex_path ] | 1642 _dex_sources = [ _lib_dex_path ] |
1629 } | 1643 } |
1630 _dex_deps = [ ":$java_target" ] | 1644 _dex_deps = [ ":$java_target" ] |
(...skipping 754 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2385 "--target", | 2399 "--target", |
2386 rebase_path(invoker.target, root_build_dir), | 2400 rebase_path(invoker.target, root_build_dir), |
2387 "--output-directory", | 2401 "--output-directory", |
2388 rebase_path(root_out_dir, root_build_dir), | 2402 rebase_path(root_out_dir, root_build_dir), |
2389 ] | 2403 ] |
2390 if (defined(invoker.flag_name)) { | 2404 if (defined(invoker.flag_name)) { |
2391 args += [ "--flag-name=${invoker.flag_name}" ] | 2405 args += [ "--flag-name=${invoker.flag_name}" ] |
2392 } | 2406 } |
2393 } | 2407 } |
2394 } | 2408 } |
OLD | NEW |