Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(154)

Side by Side Diff: build/config/android/rules.gni

Issue 2845773004: DO NOT SUBMIT: add main dex list check to classloader. (Closed)
Patch Set: Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 1711 matching lines...) Expand 10 before | Expand all | Expand 10 after
1722 if (defined(_java_sources_file)) { 1722 if (defined(_java_sources_file)) {
1723 java_sources_file = _java_sources_file 1723 java_sources_file = _java_sources_file
1724 } 1724 }
1725 1725
1726 deps = _android_manifest_deps 1726 deps = _android_manifest_deps
1727 1727
1728 if (defined(invoker.deps)) { 1728 if (defined(invoker.deps)) {
1729 possible_config_deps = invoker.deps 1729 possible_config_deps = invoker.deps
1730 } 1730 }
1731 1731
1732 if (enable_multidex) {
1733 possible_config_deps += [ ":${final_dex_target_name}_assets" ]
1734 }
1735
1732 # Added emma to the target's classpath via its .build_config. 1736 # Added emma to the target's classpath via its .build_config.
1733 if (emma_coverage && !_emma_never_instrument) { 1737 if (emma_coverage && !_emma_never_instrument) {
1734 possible_config_deps += 1738 possible_config_deps +=
1735 [ "//third_party/android_tools:emma_device_java" ] 1739 [ "//third_party/android_tools:emma_device_java" ]
1736 } 1740 }
1737 1741
1738 proguard_enabled = _proguard_enabled 1742 proguard_enabled = _proguard_enabled
1739 if (_proguard_enabled) { 1743 if (_proguard_enabled) {
1740 proguard_info = "$_proguard_output_jar_path.info" 1744 proguard_info = "$_proguard_output_jar_path.info"
1741 } 1745 }
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
1861 ":$build_config_target", 1865 ":$build_config_target",
1862 ] 1866 ]
1863 1867
1864 defines = [] 1868 defines = []
1865 if (enable_multidex) { 1869 if (enable_multidex) {
1866 defines += [ "ENABLE_MULTIDEX" ] 1870 defines += [ "ENABLE_MULTIDEX" ]
1867 } 1871 }
1868 if (is_java_debug || dcheck_always_on) { 1872 if (is_java_debug || dcheck_always_on) {
1869 defines += [ "_DCHECK_IS_ON" ] 1873 defines += [ "_DCHECK_IS_ON" ]
1870 } 1874 }
1875 if (is_official_build) {
1876 defines += [ "IS_OFFICIAL_BUILD" ]
1877 }
1871 defines += [ 1878 defines += [
1872 "COMPRESSED_LOCALE_LIST=" + 1879 "COMPRESSED_LOCALE_LIST=" +
1873 "@FileArg($_rebased_build_config:compressed_locales_java_list)", 1880 "@FileArg($_rebased_build_config:compressed_locales_java_list)",
1874 "UNCOMPRESSED_LOCALE_LIST=" + 1881 "UNCOMPRESSED_LOCALE_LIST=" +
1875 "@FileArg($_rebased_build_config:uncompressed_locales_java_list)", 1882 "@FileArg($_rebased_build_config:uncompressed_locales_java_list)",
1876 ] 1883 ]
1877 } 1884 }
1878 _srcjar_deps += [ ":${_template_name}__build_config_java" ] 1885 _srcjar_deps += [ ":${_template_name}__build_config_java" ]
1879 } 1886 }
1880 1887
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
1999 } 2006 }
2000 } else { 2007 } else {
2001 if (enable_multidex) { 2008 if (enable_multidex) {
2002 _dex_sources = [ _jar_path ] 2009 _dex_sources = [ _jar_path ]
2003 } else { 2010 } else {
2004 _dex_sources = [ _lib_dex_path ] 2011 _dex_sources = [ _lib_dex_path ]
2005 } 2012 }
2006 _dex_deps = [ ":$java_target" ] 2013 _dex_deps = [ ":$java_target" ]
2007 } 2014 }
2008 2015
2016 if (enable_multidex) {
2017 final_dex_list = "${final_dex_path}_java_list.csv"
2018 }
2009 dex("$final_dex_target_name") { 2019 dex("$final_dex_target_name") {
2010 deps = _dex_deps + [ ":$build_config_target" ] 2020 deps = _dex_deps + [ ":$build_config_target" ]
2011 inputs = [ 2021 inputs = [
2012 _build_config, 2022 _build_config,
2013 ] 2023 ]
2014 sources = _dex_sources 2024 sources = _dex_sources
2015 output = final_dex_path 2025 output = final_dex_path
2026 if (enable_multidex) {
2027 list_output = final_dex_list
2028 }
2016 2029
2017 # All deps are already included in _dex_sources when proguard is used. 2030 # All deps are already included in _dex_sources when proguard is used.
2018 if (!_proguard_enabled) { 2031 if (!_proguard_enabled) {
2019 if (enable_multidex) { 2032 if (enable_multidex) {
2020 _dex_arg_key = "${_rebased_build_config}:dist_jar:dependency_jars" 2033 _dex_arg_key = "${_rebased_build_config}:dist_jar:dependency_jars"
2021 extra_main_dex_proguard_config = _generated_proguard_main_dex_config 2034 extra_main_dex_proguard_config = _generated_proguard_main_dex_config
2022 deps += [ ":$process_resources_target" ] 2035 deps += [ ":$process_resources_target" ]
2023 } else { 2036 } else {
2024 _dex_arg_key = 2037 _dex_arg_key =
2025 "${_rebased_build_config}:final_dex:dependency_dex_files" 2038 "${_rebased_build_config}:final_dex:dependency_dex_files"
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
2098 _extra_native_libs = 2111 _extra_native_libs =
2099 [ "$root_shlib_dir/libchromium_android_linker$shlib_extension" ] 2112 [ "$root_shlib_dir/libchromium_android_linker$shlib_extension" ]
2100 _extra_native_libs_deps += 2113 _extra_native_libs_deps +=
2101 [ "//base/android/linker:chromium_android_linker" ] 2114 [ "//base/android/linker:chromium_android_linker" ]
2102 } 2115 }
2103 } 2116 }
2104 if (defined(invoker.loadable_modules) && invoker.loadable_modules != []) { 2117 if (defined(invoker.loadable_modules) && invoker.loadable_modules != []) {
2105 _extra_native_libs_even_when_incremental += invoker.loadable_modules 2118 _extra_native_libs_even_when_incremental += invoker.loadable_modules
2106 } 2119 }
2107 2120
2121 if (enable_multidex) {
2122 _final_deps += [ ":${final_dex_target_name}_assets" ]
2123 android_assets("${final_dex_target_name}_assets") {
2124 disable_compression = true
2125 deps = [
2126 ":$final_dex_target_name",
2127 ]
2128 sources = [
2129 "${final_dex_path}_java_list.csv",
2130 ]
2131 }
2132 }
2133
2108 _final_deps += [ ":${_template_name}__create" ] 2134 _final_deps += [ ":${_template_name}__create" ]
2109 create_apk("${_template_name}__create") { 2135 create_apk("${_template_name}__create") {
2110 forward_variables_from(invoker, 2136 forward_variables_from(invoker,
2111 [ 2137 [
2112 "aapt_locale_whitelist", 2138 "aapt_locale_whitelist",
2113 "alternative_android_sdk_jar", 2139 "alternative_android_sdk_jar",
2114 "android_aapt_path", 2140 "android_aapt_path",
2115 "app_as_shared_lib", 2141 "app_as_shared_lib",
2116 "deps", 2142 "deps",
2117 "extensions_to_not_compress", 2143 "extensions_to_not_compress",
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
2150 # Incremental apk does not use native libs nor final dex. 2176 # Incremental apk does not use native libs nor final dex.
2151 incremental_deps = deps + _android_manifest_deps + [ 2177 incremental_deps = deps + _android_manifest_deps + [
2152 ":$build_config_target", 2178 ":$build_config_target",
2153 ":$process_resources_target", 2179 ":$process_resources_target",
2154 ] 2180 ]
2155 2181
2156 # This target generates the input file _all_resources_zip_path. 2182 # This target generates the input file _all_resources_zip_path.
2157 deps += _android_manifest_deps + [ 2183 deps += _android_manifest_deps + [
2158 ":$build_config_target", 2184 ":$build_config_target",
2159 ":$process_resources_target", 2185 ":$process_resources_target",
2160 ":$final_dex_target_name", 2186 ":${final_dex_target_name}",
2161 ] 2187 ]
2188 if (enable_multidex) {
2189 deps += [ ":${final_dex_target_name}_assets" ]
2190 }
2162 2191
2163 if ((_native_libs_deps != [] || 2192 if ((_native_libs_deps != [] ||
2164 _extra_native_libs_even_when_incremental != []) && 2193 _extra_native_libs_even_when_incremental != []) &&
2165 !_create_abi_split) { 2194 !_create_abi_split) {
2166 deps += _native_libs_deps + _extra_native_libs_deps + 2195 deps += _native_libs_deps + _extra_native_libs_deps +
2167 [ _native_libs_file_arg_dep ] 2196 [ _native_libs_file_arg_dep ]
2168 native_libs_filearg = _native_libs_file_arg 2197 native_libs_filearg = _native_libs_file_arg
2169 native_libs = _extra_native_libs 2198 native_libs = _extra_native_libs
2170 native_libs_even_when_incremental = 2199 native_libs_even_when_incremental =
2171 _extra_native_libs_even_when_incremental 2200 _extra_native_libs_even_when_incremental
(...skipping 733 matching lines...) Expand 10 before | Expand all | Expand 10 after
2905 # because in practice they seem to contain classes required to be in the 2934 # because in practice they seem to contain classes required to be in the
2906 # classpath. 2935 # classpath.
2907 deps += _subjar_targets 2936 deps += _subjar_targets
2908 } 2937 }
2909 if (defined(_res_target_name)) { 2938 if (defined(_res_target_name)) {
2910 deps += [ ":$_res_target_name" ] 2939 deps += [ ":$_res_target_name" ]
2911 } 2940 }
2912 } 2941 }
2913 } 2942 }
2914 } 2943 }
OLDNEW
« no previous file with comments | « build/config/android/internal_rules.gni ('k') | chrome/android/java/src/org/chromium/chrome/browser/ChromeApplication.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698