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 1557 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1568 } | 1568 } |
1569 | 1569 |
1570 dex("$final_dex_target_name") { | 1570 dex("$final_dex_target_name") { |
1571 forward_variables_from(invoker, [ "enable_multidex" ]) | 1571 forward_variables_from(invoker, [ "enable_multidex" ]) |
1572 deps = _dex_deps + [ ":$build_config_target" ] | 1572 deps = _dex_deps + [ ":$build_config_target" ] |
1573 inputs = [ | 1573 inputs = [ |
1574 _build_config, | 1574 _build_config, |
1575 ] | 1575 ] |
1576 sources = _dex_sources | 1576 sources = _dex_sources |
1577 output = final_dex_path | 1577 output = final_dex_path |
1578 if (enable_multidex) { | 1578 |
1579 _dex_arg_key = "${_rebased_build_config}:dist_jar:dependency_jars" | 1579 # All deps are already included in _dex_sources when proguard is used. |
1580 } else { | 1580 if (!_proguard_enabled) { |
1581 _dex_arg_key = "${_rebased_build_config}:final_dex:dependency_dex_files" | 1581 if (enable_multidex) { |
| 1582 _dex_arg_key = "${_rebased_build_config}:dist_jar:dependency_jars" |
| 1583 } else { |
| 1584 _dex_arg_key = "${_rebased_build_config}:final_dex:dependency_dex_files" |
| 1585 } |
| 1586 args = [ "--inputs=@FileArg($_dex_arg_key)" ] |
1582 } | 1587 } |
1583 args = [ "--inputs=@FileArg($_dex_arg_key)" ] | |
1584 | 1588 |
1585 if (emma_coverage && !_emma_never_instrument) { | 1589 if (emma_coverage && !_emma_never_instrument) { |
1586 no_locals = true | 1590 no_locals = true |
1587 sources += [ "$android_sdk_root/tools/lib/emma_device.jar" ] | 1591 sources += [ "$android_sdk_root/tools/lib/emma_device.jar" ] |
1588 } | 1592 } |
1589 } | 1593 } |
1590 | 1594 |
1591 if (_native_libs != []) { | 1595 if (_native_libs != []) { |
1592 _prepare_native_target_name = "${_template_name}__prepare_native" | 1596 _prepare_native_target_name = "${_template_name}__prepare_native" |
1593 action(_prepare_native_target_name) { | 1597 action(_prepare_native_target_name) { |
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1769 rebase_path(_generated_script_path, root_build_dir) | 1773 rebase_path(_generated_script_path, root_build_dir) |
1770 _rebased_depfile = rebase_path(depfile, root_build_dir) | 1774 _rebased_depfile = rebase_path(depfile, root_build_dir) |
1771 _dex_arg_key = "${_rebased_build_config}:final_dex:dependency_dex_files" | 1775 _dex_arg_key = "${_rebased_build_config}:final_dex:dependency_dex_files" |
1772 args = [ | 1776 args = [ |
1773 "--apk-path=${_rebased_apk_path_no_ext}_incremental.apk", | 1777 "--apk-path=${_rebased_apk_path_no_ext}_incremental.apk", |
1774 "--script-output-path=$_rebased_generated_script_path", | 1778 "--script-output-path=$_rebased_generated_script_path", |
1775 "--dex-file=$_rebased_lib_dex_path", | 1779 "--dex-file=$_rebased_lib_dex_path", |
1776 "--dex-file-list=@FileArg($_dex_arg_key)", | 1780 "--dex-file-list=@FileArg($_dex_arg_key)", |
1777 "--depfile=$_rebased_depfile", | 1781 "--depfile=$_rebased_depfile", |
1778 ] | 1782 ] |
| 1783 if (_proguard_enabled) { |
| 1784 args += [ "--show-proguard-warning" ] |
| 1785 } |
1779 if (defined(_native_libs_dir)) { | 1786 if (defined(_native_libs_dir)) { |
1780 _rebased_native_libs_dir = rebase_path(_native_libs_dir, root_build_dir) | 1787 _rebased_native_libs_dir = rebase_path(_native_libs_dir, root_build_dir) |
1781 args += [ "--lib-dir=$_rebased_native_libs_dir/$android_app_abi" ] | 1788 args += [ "--lib-dir=$_rebased_native_libs_dir/$android_app_abi" ] |
1782 } | 1789 } |
1783 if (_create_density_splits) { | 1790 if (_create_density_splits) { |
1784 args += [ "--split=${_rebased_apk_path_no_ext}-density-*.apk" ] | 1791 args += [ "--split=${_rebased_apk_path_no_ext}-density-*.apk" ] |
1785 } | 1792 } |
1786 if (_create_language_splits) { | 1793 if (_create_language_splits) { |
1787 args += [ "--split=${_rebased_apk_path_no_ext}-language-*.apk" ] | 1794 args += [ "--split=${_rebased_apk_path_no_ext}-language-*.apk" ] |
1788 } | 1795 } |
(...skipping 406 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2195 } | 2202 } |
2196 | 2203 |
2197 android_library(target_name) { | 2204 android_library(target_name) { |
2198 java_files = [] | 2205 java_files = [] |
2199 srcjar_deps = [ ":${_template_name}__protoc_java" ] | 2206 srcjar_deps = [ ":${_template_name}__protoc_java" ] |
2200 deps = [ | 2207 deps = [ |
2201 "//third_party/android_protobuf:protobuf_nano_javalib", | 2208 "//third_party/android_protobuf:protobuf_nano_javalib", |
2202 ] | 2209 ] |
2203 } | 2210 } |
2204 } | 2211 } |
OLD | NEW |