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 | 6 |
| 7 assert(is_android) | 7 assert(is_android) |
| 8 | 8 |
| 9 rebased_android_sdk = rebase_path(android_sdk, root_build_dir) | 9 rebased_android_sdk = rebase_path(android_sdk, root_build_dir) |
| 10 rebased_android_sdk_root = rebase_path(android_sdk_root, root_build_dir) | 10 rebased_android_sdk_root = rebase_path(android_sdk_root, root_build_dir) |
| (...skipping 1159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1170 ] | 1170 ] |
| 1171 output = invoker.dex_path | 1171 output = invoker.dex_path |
| 1172 dex_arg_key = "${rebased_build_config}:final_dex:dependency_dex_files" | 1172 dex_arg_key = "${rebased_build_config}:final_dex:dependency_dex_files" |
| 1173 args = [ "--inputs=@FileArg($dex_arg_key)" ] | 1173 args = [ "--inputs=@FileArg($dex_arg_key)" ] |
| 1174 if (defined(invoker.excluded_jars)) { | 1174 if (defined(invoker.excluded_jars)) { |
| 1175 excluded_jars = rebase_path(invoker.excluded_jars, root_build_dir) | 1175 excluded_jars = rebase_path(invoker.excluded_jars, root_build_dir) |
| 1176 args += [ "--excluded-paths=${excluded_jars}" ] | 1176 args += [ "--excluded-paths=${excluded_jars}" ] |
| 1177 } | 1177 } |
| 1178 } | 1178 } |
| 1179 } | 1179 } |
| 1180 | |
| 1181 # Creates an AndroidManifest.xml for an APK split. | |
| 1182 template("generate_split_manifest") { | |
| 1183 assert(defined(invoker.main_manifest)) | |
| 1184 assert(defined(invoker.out_manifest)) | |
| 1185 assert(defined(invoker.split_name)) | |
| 1186 | |
| 1187 depfile = "$target_gen_dir/$target_name.d" | |
| 1188 _args = [ | |
| 1189 "--main-manifest", | |
| 1190 rebase_path(invoker.main_manifest, root_build_dir), | |
| 1191 "--out-manifest", | |
| 1192 rebase_path(invoker.out_manifest, root_build_dir), | |
| 1193 "--split", | |
| 1194 invoker.split_name, | |
| 1195 ] | |
| 1196 if (defined(invoker.version_code)) { | |
| 1197 _args += [ | |
| 1198 "--version-code", | |
| 1199 invoker.version_code, | |
| 1200 ] | |
| 1201 } | |
| 1202 if (defined(invoker.version_name)) { | |
| 1203 _args += [ | |
| 1204 "--version-name", | |
| 1205 invoker.version_name, | |
| 1206 ] | |
| 1207 } | |
| 1208 if (defined(invoker.has_code)) { | |
| 1209 _args += [ | |
| 1210 "--has-code", | |
| 1211 invoker.has_code, | |
| 1212 ] | |
| 1213 } | |
| 1214 _args += [ | |
| 1215 "--depfile", | |
| 1216 rebase_path(depfile, root_build_dir), | |
| 1217 ] | |
| 1218 | |
| 1219 action(target_name) { | |
|
cjhopman
2015/05/14 00:24:41
nit: for templates that consist of a single action
agrieve
2015/05/14 13:51:45
Done.
| |
| 1220 script = "//build/android/gyp/generate_split_manifest.py" | |
| 1221 outputs = [ | |
| 1222 depfile, | |
| 1223 invoker.out_manifest, | |
| 1224 ] | |
| 1225 inputs = [ | |
| 1226 invoker.main_manifest, | |
| 1227 ] | |
| 1228 args = _args | |
| 1229 } | |
| 1230 } | |
| OLD | NEW |