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 1517 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1528 java_files = [] | 1528 java_files = [] |
1529 } | 1529 } |
1530 srcjar_deps = _srcjar_deps | 1530 srcjar_deps = _srcjar_deps |
1531 jar_path = _jar_path | 1531 jar_path = _jar_path |
1532 dex_path = _lib_dex_path | 1532 dex_path = _lib_dex_path |
1533 emma_never_instrument = _emma_never_instrument | 1533 emma_never_instrument = _emma_never_instrument |
1534 | 1534 |
1535 if (defined(invoker.deps)) { | 1535 if (defined(invoker.deps)) { |
1536 deps += invoker.deps | 1536 deps += invoker.deps |
1537 } | 1537 } |
1538 if (defined(invoker.apk_under_test)) { | |
1539 deps += [ "${invoker.apk_under_test}__java" ] | |
1540 } | |
1541 } | 1538 } |
1542 | 1539 |
1543 # TODO(cjhopman): This is only ever needed to calculate the list of tests to | 1540 # TODO(cjhopman): This is only ever needed to calculate the list of tests to |
1544 # run. See build/android/pylib/instrumentation/test_jar.py. We should be | 1541 # run. See build/android/pylib/instrumentation/test_jar.py. We should be |
1545 # able to just do that calculation at build time instead. | 1542 # able to just do that calculation at build time instead. |
1546 if (defined(invoker.create_dist_ijar) && invoker.create_dist_ijar) { | 1543 if (defined(invoker.create_dist_ijar) && invoker.create_dist_ijar) { |
1547 _dist_ijar_path = "$root_build_dir/test.lib.java/" + | 1544 _dist_ijar_path = "$root_build_dir/test.lib.java/" + |
1548 get_path_info(_final_apk_path, "name") + ".jar" | 1545 get_path_info(_final_apk_path, "name") + ".jar" |
1549 action("${_template_name}_dist_ijar") { | 1546 action("${_template_name}_dist_ijar") { |
1550 script = "//build/android/gyp/create_dist_jar.py" | 1547 script = "//build/android/gyp/create_dist_jar.py" |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1586 ":$build_config_target", | 1583 ":$build_config_target", |
1587 ":$java_target", | 1584 ":$java_target", |
1588 ":$process_resources_target", | 1585 ":$process_resources_target", |
1589 ] | 1586 ] |
1590 inputs = [ | 1587 inputs = [ |
1591 _build_config, | 1588 _build_config, |
1592 _jar_path, | 1589 _jar_path, |
1593 ] + _proguard_configs | 1590 ] + _proguard_configs |
1594 | 1591 |
1595 output_jar_path = _proguard_jar_path | 1592 output_jar_path = _proguard_jar_path |
1596 _rebased_proguard_configs = rebase_path(_proguard_configs, root_build_dir) | 1593 rebased_proguard_configs = rebase_path(_proguard_configs, root_build_dir) |
1597 args = [ | 1594 args = [ |
1598 "--proguard-configs=$_rebased_proguard_configs", | 1595 "--proguard-configs=$rebased_proguard_configs", |
| 1596 "--tested-apk-info=@FileArg($_rebased_build_config:proguard:tested_apk_i
nfo)", |
1599 "--input-paths=@FileArg($_rebased_build_config:proguard:input_paths)", | 1597 "--input-paths=@FileArg($_rebased_build_config:proguard:input_paths)", |
1600 ] | 1598 ] |
1601 if (defined(invoker.apk_under_test)) { | |
1602 deps += [ | |
1603 "${invoker.apk_under_test}__build_config", | |
1604 "${invoker.apk_under_test}__proguard", | |
1605 ] | |
1606 _apk_under_test_build_config = | |
1607 get_label_info(invoker.apk_under_test, "target_gen_dir") + "/" + | |
1608 get_label_info(invoker.apk_under_test, "name") + ".build_config" | |
1609 _rebased_apk_under_test_build_config = | |
1610 rebase_path(_apk_under_test_build_config, root_build_dir) | |
1611 args += [ "--tested-apk-info=@FileArg($_rebased_apk_under_test_build_con
fig:deps_info:proguard_info)" ] | |
1612 } | |
1613 } | 1599 } |
1614 _dex_sources = [ _proguard_jar_path ] | 1600 _dex_sources = [ _proguard_jar_path ] |
1615 _dex_deps = [ ":$_proguard_target" ] | 1601 _dex_deps = [ ":$_proguard_target" ] |
1616 } else { | 1602 } else { |
1617 if (enable_multidex) { | 1603 if (enable_multidex) { |
1618 _dex_sources = [ _jar_path ] | 1604 _dex_sources = [ _jar_path ] |
1619 } else { | 1605 } else { |
1620 _dex_sources = [ _lib_dex_path ] | 1606 _dex_sources = [ _lib_dex_path ] |
1621 } | 1607 } |
1622 _dex_deps = [ ":$java_target" ] | 1608 _dex_deps = [ ":$java_target" ] |
(...skipping 380 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2003 (defined(invoker.java_files) || defined(invoker.DEPRECATED_java_in_dir)) | 1989 (defined(invoker.java_files) || defined(invoker.DEPRECATED_java_in_dir)) |
2004 } | 1990 } |
2005 | 1991 |
2006 group(target_name) { | 1992 group(target_name) { |
2007 public_deps = [ | 1993 public_deps = [ |
2008 ":$_apk_target_name", | 1994 ":$_apk_target_name", |
2009 ":$_test_runner_target_name", | 1995 ":$_test_runner_target_name", |
2010 | 1996 |
2011 # Required by test runner to enumerate test list. | 1997 # Required by test runner to enumerate test list. |
2012 ":${_apk_target_name}_dist_ijar", | 1998 ":${_apk_target_name}_dist_ijar", |
2013 invoker.apk_under_test, | |
2014 ] | 1999 ] |
2015 } | 2000 } |
2016 group("${target_name}_incremental") { | 2001 group("${target_name}_incremental") { |
2017 public_deps = [ | 2002 public_deps = [ |
2018 ":${_apk_target_name}_dist_ijar", | 2003 ":${_apk_target_name}_dist_ijar", |
2019 ":${_apk_target_name}_incremental", | 2004 ":${_apk_target_name}_incremental", |
2020 ":${_test_runner_target_name}_incremental", | 2005 ":${_test_runner_target_name}_incremental", |
2021 "${invoker.apk_under_test}_incremental", | 2006 "${invoker.apk_under_test}_incremental", |
2022 ] | 2007 ] |
2023 } | 2008 } |
(...skipping 307 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2331 } | 2316 } |
2332 | 2317 |
2333 android_library(target_name) { | 2318 android_library(target_name) { |
2334 java_files = [] | 2319 java_files = [] |
2335 srcjar_deps = [ ":${_template_name}__protoc_java" ] | 2320 srcjar_deps = [ ":${_template_name}__protoc_java" ] |
2336 deps = [ | 2321 deps = [ |
2337 "//third_party/android_protobuf:protobuf_nano_javalib", | 2322 "//third_party/android_protobuf:protobuf_nano_javalib", |
2338 ] | 2323 ] |
2339 } | 2324 } |
2340 } | 2325 } |
OLD | NEW |