OLD | NEW |
---|---|
1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2012 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 # This file is meant to be included into a target to provide a rule | 5 # This file is meant to be included into a target to provide a rule |
6 # to build Android APKs in a consistent manner. | 6 # to build Android APKs in a consistent manner. |
7 # | 7 # |
8 # To use this, create a gyp target with the following form: | 8 # To use this, create a gyp target with the following form: |
9 # { | 9 # { |
10 # 'target_name': 'my_package_apk', | 10 # 'target_name': 'my_package_apk', |
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
223 }, | 223 }, |
224 'dependencies': [ | 224 'dependencies': [ |
225 '<(DEPTH)/tools/android/md5sum/md5sum.gyp:md5sum', | 225 '<(DEPTH)/tools/android/md5sum/md5sum.gyp:md5sum', |
226 ], | 226 ], |
227 'actions': [ | 227 'actions': [ |
228 { | 228 { |
229 'action_name': 'push_libraries_<(_target_name)', | 229 'action_name': 'push_libraries_<(_target_name)', |
230 'message': 'Pushing libraries to device for <(_target_name)', | 230 'message': 'Pushing libraries to device for <(_target_name)', |
231 'inputs': [ | 231 'inputs': [ |
232 '<(DEPTH)/build/android/pylib/build_utils.py', | 232 '<(DEPTH)/build/android/pylib/build_utils.py', |
233 '<(DEPTH)/build/android/gyp/util/md5_check.py', | |
Yaron
2013/04/03 22:05:35
I take it you couldn't find a more generic way to
cjhopman
2013/04/03 22:17:56
Once build_utils.py is moved, I plan to introduce
| |
233 '<(DEPTH)/build/android/gyp/push_libraries.py', | 234 '<(DEPTH)/build/android/gyp/push_libraries.py', |
234 '<(strip_stamp)', | 235 '<(strip_stamp)', |
235 ], | 236 ], |
236 'outputs': [ | 237 'outputs': [ |
237 '<(push_stamp)' | 238 '<(push_stamp)' |
238 ], | 239 ], |
239 'action': [ | 240 'action': [ |
240 'python', '<(DEPTH)/build/android/gyp/push_libraries.py', | 241 'python', '<(DEPTH)/build/android/gyp/push_libraries.py', |
241 '--libraries-dir=<(apk_libraries_dir)', | 242 '--libraries-dir=<(apk_libraries_dir)', |
242 '--device-dir=<(device_library_dir)', | 243 '--device-dir=<(device_library_dir)', |
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
370 'variables': { | 371 'variables': { |
371 'all_src_dirs': [ | 372 'all_src_dirs': [ |
372 '<(java_in_dir)/src', | 373 '<(java_in_dir)/src', |
373 '<(intermediate_dir)/gen', | 374 '<(intermediate_dir)/gen', |
374 '>@(additional_src_dirs)', | 375 '>@(additional_src_dirs)', |
375 '>@(generated_src_dirs)', | 376 '>@(generated_src_dirs)', |
376 ], | 377 ], |
377 }, | 378 }, |
378 'inputs': [ | 379 'inputs': [ |
379 '<(DEPTH)/build/android/pylib/build_utils.py', | 380 '<(DEPTH)/build/android/pylib/build_utils.py', |
380 '<(DEPTH)/build/android/javac.py', | 381 '<(DEPTH)/build/android/gyp/javac.py', |
381 # If there is a separate find for additional_src_dirs, it will find the | 382 # If there is a separate find for additional_src_dirs, it will find the |
382 # wrong .java files when additional_src_dirs is empty. | 383 # wrong .java files when additional_src_dirs is empty. |
383 '>!@(find >(java_in_dir) >(additional_src_dirs) -name "*.java")', | 384 '>!@(find >(java_in_dir) >(additional_src_dirs) -name "*.java")', |
384 '>@(input_jars_paths)', | 385 '>@(input_jars_paths)', |
385 '<(codegen_stamp)', | 386 '<(codegen_stamp)', |
386 '>@(compile_input_paths)', | 387 '>@(compile_input_paths)', |
387 ], | 388 ], |
388 'outputs': [ | 389 'outputs': [ |
389 '<(compile_stamp)', | 390 '<(compile_stamp)', |
390 ], | 391 ], |
391 'action': [ | 392 'action': [ |
392 'python', '<(DEPTH)/build/android/javac.py', | 393 'python', '<(DEPTH)/build/android/gyp/javac.py', |
393 '--output-dir=<(classes_dir)', | 394 '--output-dir=<(classes_dir)', |
394 '--classpath=>(input_jars_paths) <(android_sdk_jar)', | 395 '--classpath=>(input_jars_paths) <(android_sdk_jar)', |
395 '--src-dirs=>(all_src_dirs)', | 396 '--src-dirs=>(all_src_dirs)', |
396 '--javac-includes=<(javac_includes)', | 397 '--javac-includes=<(javac_includes)', |
397 '--chromium-code=<(chromium_code)', | 398 '--chromium-code=<(chromium_code)', |
398 '--stamp=<(compile_stamp)', | 399 '--stamp=<(compile_stamp)', |
399 | 400 |
400 # TODO(newt): remove this once http://crbug.com/177552 is fixed in ninja . | 401 # TODO(newt): remove this once http://crbug.com/177552 is fixed in ninja . |
401 '--ignore=>!(echo \'>(_inputs)\' | md5sum)', | 402 '--ignore=>!(echo \'>(_inputs)\' | md5sum)', |
402 ], | 403 ], |
403 }, | 404 }, |
404 { | 405 { |
405 'action_name': 'jar_<(_target_name)', | 406 'action_name': 'jar_<(_target_name)', |
406 'message': 'Creating <(_target_name) jar', | 407 'message': 'Creating <(_target_name) jar', |
407 'inputs': [ | 408 'inputs': [ |
408 '<(DEPTH)/build/android/pylib/build_utils.py', | 409 '<(DEPTH)/build/android/pylib/build_utils.py', |
409 '<(DEPTH)/build/android/jar.py', | 410 '<(DEPTH)/build/android/gyp/util/md5_check.py', |
411 '<(DEPTH)/build/android/gyp/jar.py', | |
410 '<(compile_stamp)', | 412 '<(compile_stamp)', |
411 ], | 413 ], |
412 'outputs': [ | 414 'outputs': [ |
413 '<(jar_stamp)', | 415 '<(jar_stamp)', |
414 ], | 416 ], |
415 'action': [ | 417 'action': [ |
416 'python', '<(DEPTH)/build/android/jar.py', | 418 'python', '<(DEPTH)/build/android/gyp/jar.py', |
417 '--classes-dir=<(classes_dir)', | 419 '--classes-dir=<(classes_dir)', |
418 '--jar-path=<(jar_path)', | 420 '--jar-path=<(jar_path)', |
419 '--excluded-classes=<(jar_excluded_classes)', | 421 '--excluded-classes=<(jar_excluded_classes)', |
420 '--stamp=<(jar_stamp)', | 422 '--stamp=<(jar_stamp)', |
421 | 423 |
422 # TODO(newt): remove this once http://crbug.com/177552 is fixed in ninja . | 424 # TODO(newt): remove this once http://crbug.com/177552 is fixed in ninja . |
423 '--ignore=>!(echo \'>(_inputs)\' | md5sum)', | 425 '--ignore=>!(echo \'>(_inputs)\' | md5sum)', |
424 ] | 426 ] |
425 }, | 427 }, |
426 { | 428 { |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
478 '>@(library_dexed_jars_paths)', | 480 '>@(library_dexed_jars_paths)', |
479 ], | 481 ], |
480 'dex_generated_inputs': [ | 482 'dex_generated_inputs': [ |
481 '<(classes_dir)', | 483 '<(classes_dir)', |
482 ], | 484 ], |
483 }], | 485 }], |
484 ], | 486 ], |
485 }, | 487 }, |
486 'inputs': [ | 488 'inputs': [ |
487 '<(DEPTH)/build/android/pylib/build_utils.py', | 489 '<(DEPTH)/build/android/pylib/build_utils.py', |
488 '<(DEPTH)/build/android/dex.py', | 490 '<(DEPTH)/build/android/gyp/util/md5_check.py', |
491 '<(DEPTH)/build/android/gyp/dex.py', | |
489 '<(compile_stamp)', | 492 '<(compile_stamp)', |
490 '>@(dex_inputs)', | 493 '>@(dex_inputs)', |
491 ], | 494 ], |
492 'outputs': [ | 495 'outputs': [ |
493 '<(dex_path)', | 496 '<(dex_path)', |
494 ], | 497 ], |
495 'action': [ | 498 'action': [ |
496 'python', '<(DEPTH)/build/android/dex.py', | 499 'python', '<(DEPTH)/build/android/gyp/dex.py', |
497 '--dex-path=<(dex_path)', | 500 '--dex-path=<(dex_path)', |
498 '--android-sdk-root=<(android_sdk_root)', | 501 '--android-sdk-root=<(android_sdk_root)', |
499 | 502 |
500 # TODO(newt): remove this once http://crbug.com/177552 is fixed in ninja . | 503 # TODO(newt): remove this once http://crbug.com/177552 is fixed in ninja . |
501 '--ignore=>!(echo \'>(_inputs)\' | md5sum)', | 504 '--ignore=>!(echo \'>(_inputs)\' | md5sum)', |
502 | 505 |
503 '>@(dex_inputs)', | 506 '>@(dex_inputs)', |
504 '>@(dex_generated_inputs)', | 507 '>@(dex_generated_inputs)', |
505 ] | 508 ] |
506 }, | 509 }, |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
550 | 553 |
551 # Add list of inputs to the command line, so if inputs change | 554 # Add list of inputs to the command line, so if inputs change |
552 # (e.g. if a Java file is removed), the command will be re-run. | 555 # (e.g. if a Java file is removed), the command will be re-run. |
553 # TODO(newt): remove this once crbug.com/177552 is fixed in ninja. | 556 # TODO(newt): remove this once crbug.com/177552 is fixed in ninja. |
554 '-DTHIS_IS_IGNORED=>!(echo \'>(_inputs)\' | md5sum)', | 557 '-DTHIS_IS_IGNORED=>!(echo \'>(_inputs)\' | md5sum)', |
555 | 558 |
556 ] | 559 ] |
557 }, | 560 }, |
558 ], | 561 ], |
559 } | 562 } |
OLD | NEW |