| 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/sanitizers/sanitizers.gni") | 6 import("//build/config/sanitizers/sanitizers.gni") |
| 7 import("//build/config/zip.gni") | 7 import("//build/config/zip.gni") |
| 8 import("//third_party/ijar/ijar.gni") | 8 import("//third_party/ijar/ijar.gni") |
| 9 | 9 |
| 10 assert(is_android) | 10 assert(is_android) |
| (...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 233 "--classpath=@FileArg($_rebased_build_config:java:full_classpath)", | 233 "--classpath=@FileArg($_rebased_build_config:java:full_classpath)", |
| 234 "--jar-path", | 234 "--jar-path", |
| 235 rebase_path(_jar_path, root_build_dir), | 235 rebase_path(_jar_path, root_build_dir), |
| 236 "--main-class", | 236 "--main-class", |
| 237 _main_class, | 237 _main_class, |
| 238 ] | 238 ] |
| 239 if (defined(invoker.wrapper_script_args)) { | 239 if (defined(invoker.wrapper_script_args)) { |
| 240 args += [ "--" ] + invoker.wrapper_script_args | 240 args += [ "--" ] + invoker.wrapper_script_args |
| 241 } | 241 } |
| 242 if (defined(invoker.bootclasspath)) { | 242 if (defined(invoker.bootclasspath)) { |
| 243 inputs += [ invoker.bootclasspath ] |
| 243 args += [ | 244 args += [ |
| 244 "--bootclasspath", | 245 "--bootclasspath", |
| 245 invoker.bootclasspath, | 246 rebase_path(invoker.bootclasspath, root_build_dir), |
| 246 ] | 247 ] |
| 247 } | 248 } |
| 248 } | 249 } |
| 249 } | 250 } |
| 250 | 251 |
| 251 template("dex") { | 252 template("dex") { |
| 252 set_sources_assignment_filter([]) | 253 set_sources_assignment_filter([]) |
| 253 | 254 |
| 254 _enable_multidex = defined(invoker.enable_multidex) && invoker.enable_multidex | 255 _enable_multidex = defined(invoker.enable_multidex) && invoker.enable_multidex |
| 255 | 256 |
| (...skipping 1064 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1320 _jar_path, | 1321 _jar_path, |
| 1321 ] | 1322 ] |
| 1322 output = _dex_path | 1323 output = _dex_path |
| 1323 deps = [ ":$_process_jar_target_name" ] + _deps + _jar_deps | 1324 deps = [ ":$_process_jar_target_name" ] + _deps + _jar_deps |
| 1324 } | 1325 } |
| 1325 } | 1326 } |
| 1326 | 1327 |
| 1327 if (defined(invoker.main_class)) { | 1328 if (defined(invoker.main_class)) { |
| 1328 _binary_script_target_name = "${_template_name}__java_binary_script" | 1329 _binary_script_target_name = "${_template_name}__java_binary_script" |
| 1329 java_binary_script(_binary_script_target_name) { | 1330 java_binary_script(_binary_script_target_name) { |
| 1331 deps = [] |
| 1330 forward_variables_from(invoker, | 1332 forward_variables_from(invoker, |
| 1331 [ | 1333 [ |
| 1332 "bootclasspath", | 1334 "bootclasspath", |
| 1335 "deps", |
| 1333 "main_class", | 1336 "main_class", |
| 1334 "wrapper_script_args", | 1337 "wrapper_script_args", |
| 1335 ]) | 1338 ]) |
| 1336 build_config = _build_config | 1339 build_config = _build_config |
| 1337 jar_path = _jar_path | 1340 jar_path = _jar_path |
| 1338 script_name = _template_name | 1341 script_name = _template_name |
| 1339 if (defined(invoker.wrapper_script_name)) { | 1342 if (defined(invoker.wrapper_script_name)) { |
| 1340 script_name = invoker.wrapper_script_name | 1343 script_name = invoker.wrapper_script_name |
| 1341 } | 1344 } |
| 1342 deps = [ | 1345 deps += [ ":$_build_config_target_name" ] |
| 1343 ":$_build_config_target_name", | |
| 1344 ] | |
| 1345 } | 1346 } |
| 1346 } | 1347 } |
| 1347 | 1348 |
| 1348 group(target_name) { | 1349 group(target_name) { |
| 1349 forward_variables_from(invoker, [ "data_deps" ]) | 1350 forward_variables_from(invoker, [ "data_deps" ]) |
| 1350 deps = [ | 1351 public_deps = [ |
| 1351 ":$_ijar_target_name", | 1352 ":$_ijar_target_name", |
| 1352 ":$_process_jar_target_name", | 1353 ":$_process_jar_target_name", |
| 1353 ] | 1354 ] |
| 1354 if (_supports_android) { | 1355 if (_supports_android) { |
| 1355 deps += [ ":$_dex_target_name" ] | 1356 public_deps += [ ":$_dex_target_name" ] |
| 1356 } | |
| 1357 data_deps = [] | |
| 1358 if (defined(invoker.data_deps)) { | |
| 1359 data_deps += invoker.data_deps | |
| 1360 } | 1357 } |
| 1361 if (defined(invoker.main_class)) { | 1358 if (defined(invoker.main_class)) { |
| 1362 # Some targets use the generated script while building, so make it a dep | 1359 # Some targets use the generated script while building, so make it a dep |
| 1363 # rather than a data_dep. | 1360 # rather than a data_dep. |
| 1364 deps += [ ":$_binary_script_target_name" ] | 1361 public_deps += [ ":$_binary_script_target_name" ] |
| 1365 } | 1362 } |
| 1366 } | 1363 } |
| 1367 } | 1364 } |
| 1368 | 1365 |
| 1369 # Compiles and jars a set of java files. | 1366 # Compiles and jars a set of java files. |
| 1370 # | 1367 # |
| 1371 # Outputs: | 1368 # Outputs: |
| 1372 # $jar_path.jar | 1369 # $jar_path.jar |
| 1373 # $jar_path.interface.jar | 1370 # $jar_path.interface.jar |
| 1374 # | 1371 # |
| (...skipping 810 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2185 ] | 2182 ] |
| 2186 args = [ | 2183 args = [ |
| 2187 "--depfile", | 2184 "--depfile", |
| 2188 rebase_path(depfile, root_build_dir), | 2185 rebase_path(depfile, root_build_dir), |
| 2189 "--script-output-path", | 2186 "--script-output-path", |
| 2190 rebase_path(generated_script, root_build_dir), | 2187 rebase_path(generated_script, root_build_dir), |
| 2191 ] | 2188 ] |
| 2192 args += test_runner_args | 2189 args += test_runner_args |
| 2193 } | 2190 } |
| 2194 } | 2191 } |
| OLD | NEW |