Chromium Code Reviews| 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("//build/config/android/config.gni") | 5 import("//build/config/android/config.gni") |
| 6 import("//build/config/android/internal_rules.gni") | 6 import("//build/config/android/internal_rules.gni") |
| 7 import("//build/toolchain/toolchain.gni") | 7 import("//build/toolchain/toolchain.gni") |
| 8 | 8 |
| 9 assert(is_android) | 9 assert(is_android) |
| 10 | 10 |
| (...skipping 1819 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1830 _proguard_configs += invoker.proguard_configs | 1830 _proguard_configs += invoker.proguard_configs |
| 1831 } | 1831 } |
| 1832 assert(_proguard_configs != []) # Mark as used. | 1832 assert(_proguard_configs != []) # Mark as used. |
| 1833 _proguard_target = "${_template_name}__proguard" | 1833 _proguard_target = "${_template_name}__proguard" |
| 1834 proguard(_proguard_target) { | 1834 proguard(_proguard_target) { |
| 1835 forward_variables_from(invoker, | 1835 forward_variables_from(invoker, |
| 1836 [ | 1836 [ |
| 1837 "alternative_android_sdk_jar", | 1837 "alternative_android_sdk_jar", |
| 1838 "proguard_jar_path", | 1838 "proguard_jar_path", |
| 1839 ]) | 1839 ]) |
| 1840 args = [] | |
| 1840 deps = [ | 1841 deps = [ |
| 1841 ":$build_config_target", | 1842 ":$build_config_target", |
| 1842 ":$java_target", | 1843 ":$java_target", |
| 1843 ":$process_resources_target", | 1844 ":$process_resources_target", |
| 1844 ] | 1845 ] |
| 1845 inputs = [ | |
| 1846 _build_config, | |
| 1847 _jar_path, | |
| 1848 ] + _proguard_configs | |
| 1849 | |
| 1850 output_jar_path = _proguard_output_jar_path | |
| 1851 _rebased_proguard_configs = | |
| 1852 rebase_path(_proguard_configs, root_build_dir) | |
| 1853 args = [ | |
| 1854 "--proguard-configs=$_rebased_proguard_configs", | |
| 1855 "--input-paths=@FileArg($_rebased_build_config:proguard:input_paths)", | |
| 1856 ] | |
| 1857 if (defined(invoker.apk_under_test)) { | 1846 if (defined(invoker.apk_under_test)) { |
| 1858 deps += [ | 1847 deps += [ |
| 1859 "${invoker.apk_under_test}__build_config", | 1848 "${invoker.apk_under_test}__build_config", |
| 1860 "${invoker.apk_under_test}__proguard", | 1849 "${invoker.apk_under_test}__proguard", |
| 1861 ] | 1850 ] |
| 1862 _apk_under_test_build_config = | 1851 _apk_under_test_build_config = |
| 1863 get_label_info(invoker.apk_under_test, "target_gen_dir") + "/" + | 1852 get_label_info(invoker.apk_under_test, "target_gen_dir") + "/" + |
| 1864 get_label_info(invoker.apk_under_test, "name") + ".build_config" | 1853 get_label_info(invoker.apk_under_test, "name") + ".build_config" |
| 1865 _rebased_apk_under_test_build_config = | 1854 _rebased_apk_under_test_build_config = |
| 1866 rebase_path(_apk_under_test_build_config, root_build_dir) | 1855 rebase_path(_apk_under_test_build_config, root_build_dir) |
| 1867 args += [ "--tested-apk-info=@FileArg($_rebased_apk_under_test_build_c onfig:deps_info:proguard_info)" ] | 1856 args += [ "--tested-apk-info=@FileArg($_rebased_apk_under_test_build_c onfig:deps_info:proguard_info)" ] |
| 1857 _proguard_configs += [ "//testing/android/proguard_for_test.flags" ] | |
|
agrieve
2016/07/28 01:30:58
nit: It might be nicer to add this in via instrume
smaier
2016/07/28 15:27:19
Done.
| |
| 1868 } | 1858 } |
| 1859 | |
| 1860 inputs = [ | |
| 1861 _build_config, | |
| 1862 _jar_path, | |
| 1863 ] + _proguard_configs | |
| 1864 | |
| 1865 output_jar_path = _proguard_output_jar_path | |
| 1866 _rebased_proguard_configs = | |
| 1867 rebase_path(_proguard_configs, root_build_dir) | |
| 1868 args += [ | |
| 1869 "--proguard-configs=$_rebased_proguard_configs", | |
| 1870 "--input-paths=@FileArg($_rebased_build_config:proguard:input_paths)", | |
| 1871 ] | |
| 1869 } | 1872 } |
| 1870 _dex_sources = [ _proguard_output_jar_path ] | 1873 _dex_sources = [ _proguard_output_jar_path ] |
| 1871 _dex_deps = [ ":$_proguard_target" ] | 1874 _dex_deps = [ ":$_proguard_target" ] |
| 1872 | 1875 |
| 1873 _copy_proguard_mapping_target = "${_template_name}__copy_proguard_mapping" | 1876 _copy_proguard_mapping_target = "${_template_name}__copy_proguard_mapping" |
| 1874 copy(_copy_proguard_mapping_target) { | 1877 copy(_copy_proguard_mapping_target) { |
| 1875 sources = [ | 1878 sources = [ |
| 1876 "$_proguard_output_jar_path.mapping", | 1879 "$_proguard_output_jar_path.mapping", |
| 1877 ] | 1880 ] |
| 1878 outputs = [ | 1881 outputs = [ |
| (...skipping 784 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2663 android_manifest = "${_output_path}/AndroidManifest.xml" | 2666 android_manifest = "${_output_path}/AndroidManifest.xml" |
| 2664 v14_skip = true | 2667 v14_skip = true |
| 2665 } | 2668 } |
| 2666 } | 2669 } |
| 2667 | 2670 |
| 2668 java_group(target_name) { | 2671 java_group(target_name) { |
| 2669 deps = _sub_target_names | 2672 deps = _sub_target_names |
| 2670 } | 2673 } |
| 2671 } | 2674 } |
| 2672 } | 2675 } |
| OLD | NEW |