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/toolchain/toolchain.gni") | 8 import("//build/toolchain/toolchain.gni") |
9 import("//third_party/android_platform/config.gni") | 9 import("//third_party/android_platform/config.gni") |
10 import("//tools/grit/grit_rule.gni") | 10 import("//tools/grit/grit_rule.gni") |
(...skipping 914 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
925 wrapper_script_args = [ | 925 wrapper_script_args = [ |
926 "-test-jars", | 926 "-test-jars", |
927 "$target_name.jar", | 927 "$target_name.jar", |
928 ] | 928 ] |
929 testonly = true | 929 testonly = true |
930 | 930 |
931 deps += [ | 931 deps += [ |
932 "//testing/android/junit:junit_test_support", | 932 "//testing/android/junit:junit_test_support", |
933 "//third_party/junit", | 933 "//third_party/junit", |
934 "//third_party/mockito:mockito_java", | 934 "//third_party/mockito:mockito_java", |
| 935 "//third_party/robolectric:android-all-4.3_r2-robolectric-0", |
935 "//third_party/robolectric:robolectric_java", | 936 "//third_party/robolectric:robolectric_java", |
936 "//third_party/robolectric:android-all-4.3_r2-robolectric-0", | |
937 ] | 937 ] |
938 } | 938 } |
939 } | 939 } |
940 | 940 |
941 # Declare a java library target | 941 # Declare a java library target |
942 # | 942 # |
943 # Variables | 943 # Variables |
944 # deps: Specifies the dependencies of this target. Java targets in this list | 944 # deps: Specifies the dependencies of this target. Java targets in this list |
945 # will be added to the javac classpath. | 945 # will be added to the javac classpath. |
946 # | 946 # |
(...skipping 567 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1514 | 1514 |
1515 if (_proguard_enabled) { | 1515 if (_proguard_enabled) { |
1516 _proguard_configs = [ _generated_proguard_config ] | 1516 _proguard_configs = [ _generated_proguard_config ] |
1517 if (defined(invoker.proguard_configs)) { | 1517 if (defined(invoker.proguard_configs)) { |
1518 _proguard_configs += invoker.proguard_configs | 1518 _proguard_configs += invoker.proguard_configs |
1519 } | 1519 } |
1520 _proguard_target = "${_template_name}__proguard" | 1520 _proguard_target = "${_template_name}__proguard" |
1521 proguard(_proguard_target) { | 1521 proguard(_proguard_target) { |
1522 deps = [ | 1522 deps = [ |
1523 ":$build_config_target", | 1523 ":$build_config_target", |
| 1524 ":$java_target", |
1524 ":$process_resources_target", | 1525 ":$process_resources_target", |
1525 ":$java_target", | |
1526 ] | 1526 ] |
1527 inputs = [ | 1527 inputs = [ |
1528 _build_config, | 1528 _build_config, |
1529 _jar_path, | 1529 _jar_path, |
1530 ] + _proguard_configs | 1530 ] + _proguard_configs |
1531 | 1531 |
1532 output_jar_path = _proguard_jar_path | 1532 output_jar_path = _proguard_jar_path |
1533 rebased_proguard_configs = rebase_path(_proguard_configs, root_build_dir) | 1533 rebased_proguard_configs = rebase_path(_proguard_configs, root_build_dir) |
1534 args = [ | 1534 args = [ |
1535 "--proguard-configs=$rebased_proguard_configs", | 1535 "--proguard-configs=$rebased_proguard_configs", |
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1656 # This target generates the input file _all_resources_zip_path. | 1656 # This target generates the input file _all_resources_zip_path. |
1657 deps += _android_manifest_deps + [ | 1657 deps += _android_manifest_deps + [ |
1658 ":$build_config_target", | 1658 ":$build_config_target", |
1659 ":$process_resources_target", | 1659 ":$process_resources_target", |
1660 ":$final_dex_target_name", | 1660 ":$final_dex_target_name", |
1661 ] | 1661 ] |
1662 | 1662 |
1663 if (_native_libs != [] && !_create_abi_split) { | 1663 if (_native_libs != [] && !_create_abi_split) { |
1664 native_libs_dir = _native_libs_dir | 1664 native_libs_dir = _native_libs_dir |
1665 | 1665 |
1666 # Placeholders are not necessary for L+, so add them here, but don't | 1666 # Placeholders necessary for some older devices. |
1667 # bother to create them in the case of splits. | |
1668 # http://crbug.com/395038 | 1667 # http://crbug.com/395038 |
1669 forward_variables_from(invoker, [ "native_lib_placeholders" ]) | 1668 forward_variables_from(invoker, [ "native_lib_placeholders" ]) |
1670 | 1669 |
1671 deps += [ ":$_prepare_native_target_name" ] | 1670 deps += [ ":$_prepare_native_target_name" ] |
1672 } | 1671 } |
1673 } | 1672 } |
1674 | 1673 |
1675 if (_native_libs != [] && _create_abi_split) { | 1674 if (_native_libs != [] && _create_abi_split) { |
1676 _manifest_rule = "${_template_name}__split_manifest_abi_${android_app_abi}" | 1675 _manifest_rule = "${_template_name}__split_manifest_abi_${android_app_abi}" |
1677 generate_split_manifest(_manifest_rule) { | 1676 generate_split_manifest(_manifest_rule) { |
(...skipping 16 matching lines...) Expand all Loading... |
1694 load_library_from_apk = _load_library_from_apk | 1693 load_library_from_apk = _load_library_from_apk |
1695 | 1694 |
1696 version_code = _version_code | 1695 version_code = _version_code |
1697 version_name = _version_name | 1696 version_name = _version_name |
1698 | 1697 |
1699 keystore_name = _keystore_name | 1698 keystore_name = _keystore_name |
1700 keystore_path = _keystore_path | 1699 keystore_path = _keystore_path |
1701 keystore_password = _keystore_password | 1700 keystore_password = _keystore_password |
1702 | 1701 |
1703 native_libs_dir = _native_libs_dir | 1702 native_libs_dir = _native_libs_dir |
| 1703 |
| 1704 # Placeholders necessary for some older devices. |
| 1705 # http://crbug.com/395038 |
| 1706 forward_variables_from(invoker, [ "native_lib_placeholders" ]) |
| 1707 |
1704 deps = [ | 1708 deps = [ |
| 1709 ":${_manifest_rule}", |
1705 ":${_prepare_native_target_name}", | 1710 ":${_prepare_native_target_name}", |
1706 ":${_manifest_rule}", | |
1707 ] | 1711 ] |
1708 incremental_deps = deps | 1712 incremental_deps = deps |
1709 } | 1713 } |
1710 } | 1714 } |
1711 | 1715 |
1712 _create_incremental_script_rule_name = "${_template_name}__incremental_script" | 1716 _create_incremental_script_rule_name = "${_template_name}__incremental_script" |
1713 action(_create_incremental_script_rule_name) { | 1717 action(_create_incremental_script_rule_name) { |
1714 script = "//build/android/incremental_install/create_install_script.py" | 1718 script = "//build/android/incremental_install/create_install_script.py" |
1715 depfile = "$target_gen_dir/$target_name.d" | 1719 depfile = "$target_gen_dir/$target_name.d" |
1716 deps = [ | 1720 deps = [ |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1757 data_deps = [] | 1761 data_deps = [] |
1758 forward_variables_from(invoker, [ "data_deps" ]) | 1762 forward_variables_from(invoker, [ "data_deps" ]) |
1759 | 1763 |
1760 # device/commands is used by the installer script to push files via .zip. | 1764 # device/commands is used by the installer script to push files via .zip. |
1761 data_deps += [ "//build/android/pylib/device/commands" ] | 1765 data_deps += [ "//build/android/pylib/device/commands" ] |
1762 | 1766 |
1763 # Since the _incremental.apk does not include use .so nor .dex from the | 1767 # Since the _incremental.apk does not include use .so nor .dex from the |
1764 # actual target, but instead loads them at runtime, we need to explicitly | 1768 # actual target, but instead loads them at runtime, we need to explicitly |
1765 # depend on them here. | 1769 # depend on them here. |
1766 public_deps = [ | 1770 public_deps = [ |
| 1771 ":${_create_incremental_script_rule_name}", |
1767 ":${_template_name}__create_incremental", | 1772 ":${_template_name}__create_incremental", |
1768 ":${_create_incremental_script_rule_name}", | |
1769 ":${java_target}", | 1773 ":${java_target}", |
1770 ] | 1774 ] |
1771 if (_native_libs != []) { | 1775 if (_native_libs != []) { |
1772 public_deps += [ ":$_prepare_native_target_name" ] | 1776 public_deps += [ ":$_prepare_native_target_name" ] |
1773 } | 1777 } |
1774 } | 1778 } |
1775 } | 1779 } |
1776 | 1780 |
1777 # Declare an Android instrumentation test apk | 1781 # Declare an Android instrumentation test apk |
1778 # | 1782 # |
(...skipping 384 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2163 } | 2167 } |
2164 | 2168 |
2165 android_library(target_name) { | 2169 android_library(target_name) { |
2166 java_files = [] | 2170 java_files = [] |
2167 srcjar_deps = [ ":${_template_name}__protoc_java" ] | 2171 srcjar_deps = [ ":${_template_name}__protoc_java" ] |
2168 deps = [ | 2172 deps = [ |
2169 "//third_party/android_protobuf:protobuf_nano_javalib", | 2173 "//third_party/android_protobuf:protobuf_nano_javalib", |
2170 ] | 2174 ] |
2171 } | 2175 } |
2172 } | 2176 } |
OLD | NEW |