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

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

Issue 1451483002: [Android] Add gn support for multidex. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: +comment in ChromiumMultiDex.template Created 5 years, 1 month 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
« no previous file with comments | « build/android/main_dex_action.gypi ('k') | build/config/android/rules.gni » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 import("//build/config/android/config.gni") 5 import("//build/config/android/config.gni")
6 import("//build/config/zip.gni") 6 import("//build/config/zip.gni")
7 import("//third_party/ijar/ijar.gni") 7 import("//third_party/ijar/ijar.gni")
8 8
9 assert(is_android) 9 assert(is_android)
10 10
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
216 "--bootclasspath", 216 "--bootclasspath",
217 invoker.bootclasspath, 217 invoker.bootclasspath,
218 ] 218 ]
219 } 219 }
220 } 220 }
221 } 221 }
222 222
223 template("dex") { 223 template("dex") {
224 set_sources_assignment_filter([]) 224 set_sources_assignment_filter([])
225 225
226 _enable_multidex = defined(invoker.enable_multidex) && invoker.enable_multidex
227
228 if (_enable_multidex) {
229 _main_dex_list_path = invoker.output + ".main_dex_list"
230 _main_dex_list_target_name = "${target_name}__main_dex_list"
231 action(_main_dex_list_target_name) {
232 forward_variables_from(invoker,
233 [
234 "deps",
235 "inputs",
236 "sources",
237 "testonly",
238 ])
239
240 script = "//build/android/gyp/main_dex_list.py"
241 depfile = "$target_gen_dir/$target_name.d"
242
243 main_dex_rules = "//build/android/main_dex_classes.flags"
244
245 outputs = [
246 depfile,
247 _main_dex_list_path,
248 ]
249
250 args = [
251 "--depfile",
252 rebase_path(depfile, root_build_dir),
253 "--android-sdk-tools",
254 rebased_android_sdk_build_tools,
255 "--main-dex-list-path",
256 rebase_path(_main_dex_list_path, root_build_dir),
257 "--main-dex-rules-path",
258 rebase_path(main_dex_rules, root_build_dir),
259 ]
260
261 if (defined(invoker.args)) {
262 args += invoker.args
263 }
264
265 if (defined(invoker.sources)) {
266 args += rebase_path(invoker.sources, root_build_dir)
267 }
268 }
269 }
270
226 assert(defined(invoker.output)) 271 assert(defined(invoker.output))
227 action(target_name) { 272 action(target_name) {
228 forward_variables_from(invoker, 273 forward_variables_from(invoker,
229 [ 274 [
230 "deps", 275 "deps",
231 "inputs", 276 "inputs",
232 "sources", 277 "sources",
233 "testonly", 278 "testonly",
234 ]) 279 ])
235 script = "//build/android/gyp/dex.py" 280 script = "//build/android/gyp/dex.py"
(...skipping 15 matching lines...) Expand all
251 ] 296 ]
252 297
253 if (enable_incremental_dx) { 298 if (enable_incremental_dx) {
254 args += [ "--incremental" ] 299 args += [ "--incremental" ]
255 } 300 }
256 301
257 if (defined(invoker.no_locals) && invoker.no_locals) { 302 if (defined(invoker.no_locals) && invoker.no_locals) {
258 args += [ "--no-locals=1" ] 303 args += [ "--no-locals=1" ]
259 } 304 }
260 305
306 if (_enable_multidex) {
307 args += [
308 "--multi-dex",
309 "--main-dex-list-path",
310 rebase_path(_main_dex_list_path, root_build_dir),
311 ]
312 deps += [ ":${_main_dex_list_target_name}" ]
313 inputs += [ _main_dex_list_path ]
314 }
315
261 if (defined(invoker.args)) { 316 if (defined(invoker.args)) {
262 args += invoker.args 317 args += invoker.args
263 } 318 }
264 319
265 if (defined(invoker.sources)) { 320 if (defined(invoker.sources)) {
266 args += rebase_path(invoker.sources, root_build_dir) 321 args += rebase_path(invoker.sources, root_build_dir)
267 } 322 }
268 } 323 }
269 } 324 }
270 325
(...skipping 1640 matching lines...) Expand 10 before | Expand all | Expand 10 after
1911 ] 1966 ]
1912 args = [ 1967 args = [
1913 "--depfile", 1968 "--depfile",
1914 rebase_path(depfile, root_build_dir), 1969 rebase_path(depfile, root_build_dir),
1915 "--script-output-path", 1970 "--script-output-path",
1916 rebase_path(generated_script, root_build_dir), 1971 rebase_path(generated_script, root_build_dir),
1917 ] 1972 ]
1918 args += test_runner_args 1973 args += test_runner_args
1919 } 1974 }
1920 } 1975 }
OLDNEW
« no previous file with comments | « build/android/main_dex_action.gypi ('k') | build/config/android/rules.gni » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698