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 # Do not add any imports to non-//build directories here. | 5 # Do not add any imports to non-//build directories here. |
6 # Some projects (e.g. V8) do not have non-build directories DEPS'ed in. | 6 # Some projects (e.g. V8) do not have non-build directories DEPS'ed in. |
7 import("//build/config/android/config.gni") | 7 import("//build/config/android/config.gni") |
8 import("//build/config/android/internal_rules.gni") | 8 import("//build/config/android/internal_rules.gni") |
9 import("//build/config/compiler/compiler.gni") | 9 import("//build/config/compiler/compiler.gni") |
10 import("//build/config/dcheck_always_on.gni") | 10 import("//build/config/dcheck_always_on.gni") |
(...skipping 1653 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1664 shared_libraries_runtime_deps_file = _runtime_deps_file | 1664 shared_libraries_runtime_deps_file = _runtime_deps_file |
1665 } | 1665 } |
1666 if (_secondary_abi_native_libs_deps != []) { | 1666 if (_secondary_abi_native_libs_deps != []) { |
1667 secondary_abi_shared_libraries_runtime_deps_file = | 1667 secondary_abi_shared_libraries_runtime_deps_file = |
1668 _secondary_abi_runtime_deps_file | 1668 _secondary_abi_runtime_deps_file |
1669 } | 1669 } |
1670 } | 1670 } |
1671 | 1671 |
1672 _final_deps = [] | 1672 _final_deps = [] |
1673 | 1673 |
| 1674 if (enable_multidex) { |
| 1675 _generated_proguard_main_dex_config = |
| 1676 "$base_path.resources.main-dex-proguard.txt" |
| 1677 } |
1674 _generated_proguard_config = "$base_path.resources.proguard.txt" | 1678 _generated_proguard_config = "$base_path.resources.proguard.txt" |
1675 process_resources_target = "${_template_name}__process_resources" | 1679 process_resources_target = "${_template_name}__process_resources" |
1676 process_resources(process_resources_target) { | 1680 process_resources(process_resources_target) { |
1677 forward_variables_from(invoker, | 1681 forward_variables_from(invoker, |
1678 [ | 1682 [ |
1679 "alternative_android_sdk_jar", | 1683 "alternative_android_sdk_jar", |
1680 "android_aapt_path", | 1684 "android_aapt_path", |
1681 "app_as_shared_lib", | 1685 "app_as_shared_lib", |
1682 "include_all_resources", | 1686 "include_all_resources", |
1683 "shared_resources", | 1687 "shared_resources", |
1684 ]) | 1688 ]) |
1685 srcjar_path = "${target_gen_dir}/${target_name}.srcjar" | 1689 srcjar_path = "${target_gen_dir}/${target_name}.srcjar" |
1686 r_text_out_path = "${target_gen_dir}/${target_name}_R.txt" | 1690 r_text_out_path = "${target_gen_dir}/${target_name}_R.txt" |
1687 android_manifest = _android_manifest | 1691 android_manifest = _android_manifest |
1688 resource_dirs = [ "//build/android/ant/empty/res" ] | 1692 resource_dirs = [ "//build/android/ant/empty/res" ] |
1689 zip_path = resources_zip_path | 1693 zip_path = resources_zip_path |
1690 all_resources_zip_path = _all_resources_zip_path | 1694 all_resources_zip_path = _all_resources_zip_path |
1691 generate_constant_ids = true | 1695 generate_constant_ids = true |
1692 proguard_file = _generated_proguard_config | 1696 proguard_file = _generated_proguard_config |
| 1697 if (enable_multidex) { |
| 1698 proguard_file_main_dex = _generated_proguard_main_dex_config |
| 1699 } |
1693 | 1700 |
1694 build_config = _build_config | 1701 build_config = _build_config |
1695 deps = _android_manifest_deps + [ ":$build_config_target" ] | 1702 deps = _android_manifest_deps + [ ":$build_config_target" ] |
1696 if (defined(invoker.deps)) { | 1703 if (defined(invoker.deps)) { |
1697 deps += invoker.deps | 1704 deps += invoker.deps |
1698 } | 1705 } |
1699 } | 1706 } |
1700 _srcjar_deps += [ ":$process_resources_target" ] | 1707 _srcjar_deps += [ ":$process_resources_target" ] |
1701 | 1708 |
1702 if (_native_libs_deps != []) { | 1709 if (_native_libs_deps != []) { |
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1929 inputs = [ | 1936 inputs = [ |
1930 _build_config, | 1937 _build_config, |
1931 ] | 1938 ] |
1932 sources = _dex_sources | 1939 sources = _dex_sources |
1933 output = final_dex_path | 1940 output = final_dex_path |
1934 | 1941 |
1935 # All deps are already included in _dex_sources when proguard is used. | 1942 # All deps are already included in _dex_sources when proguard is used. |
1936 if (!_proguard_enabled) { | 1943 if (!_proguard_enabled) { |
1937 if (enable_multidex) { | 1944 if (enable_multidex) { |
1938 _dex_arg_key = "${_rebased_build_config}:dist_jar:dependency_jars" | 1945 _dex_arg_key = "${_rebased_build_config}:dist_jar:dependency_jars" |
| 1946 extra_main_dex_proguard_config = _generated_proguard_main_dex_config |
| 1947 deps += [ ":$process_resources_target" ] |
1939 } else { | 1948 } else { |
1940 _dex_arg_key = | 1949 _dex_arg_key = |
1941 "${_rebased_build_config}:final_dex:dependency_dex_files" | 1950 "${_rebased_build_config}:final_dex:dependency_dex_files" |
1942 } | 1951 } |
1943 args = [ "--inputs=@FileArg($_dex_arg_key)" ] | 1952 args = [ "--inputs=@FileArg($_dex_arg_key)" ] |
1944 } | 1953 } |
1945 } | 1954 } |
1946 | 1955 |
1947 _native_libs_file_arg_dep = ":$build_config_target" | 1956 _native_libs_file_arg_dep = ":$build_config_target" |
1948 _native_libs_file_arg = "@FileArg($_rebased_build_config:native:libraries)" | 1957 _native_libs_file_arg = "@FileArg($_rebased_build_config:native:libraries)" |
(...skipping 883 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2832 # because in practice they seem to contain classes required to be in the | 2841 # because in practice they seem to contain classes required to be in the |
2833 # classpath. | 2842 # classpath. |
2834 deps += _subjar_targets | 2843 deps += _subjar_targets |
2835 } | 2844 } |
2836 if (defined(_res_target_name)) { | 2845 if (defined(_res_target_name)) { |
2837 deps += [ ":$_res_target_name" ] | 2846 deps += [ ":$_res_target_name" ] |
2838 } | 2847 } |
2839 } | 2848 } |
2840 } | 2849 } |
2841 } | 2850 } |
OLD | NEW |