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 507 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
518 # If there is a separate find for additional_src_dirs, it will find the | 518 # If there is a separate find for additional_src_dirs, it will find the |
519 # wrong .java files when additional_src_dirs is empty. | 519 # wrong .java files when additional_src_dirs is empty. |
520 # TODO(thakis): Gyp caches >! evaluation by command. Both java.gypi and | 520 # TODO(thakis): Gyp caches >! evaluation by command. Both java.gypi and |
521 # java_apk.gypi evaluate the same command, and at the moment two targets | 521 # java_apk.gypi evaluate the same command, and at the moment two targets |
522 # set java_in_dir to "java". Add a dummy comment here to make sure | 522 # set java_in_dir to "java". Add a dummy comment here to make sure |
523 # that the two targets (one uses java.gypi, the other java_apk.gypi) | 523 # that the two targets (one uses java.gypi, the other java_apk.gypi) |
524 # get distinct source lists. Medium-term, make targets list all their | 524 # get distinct source lists. Medium-term, make targets list all their |
525 # Java files instead of using find. (As is, this will be broken if two | 525 # Java files instead of using find. (As is, this will be broken if two |
526 # targets use the same java_in_dir and both use java_apk.gypi or | 526 # targets use the same java_in_dir and both use java_apk.gypi or |
527 # both use java.gypi.) | 527 # both use java.gypi.) |
528 'java_source_list': '>|(javasources.<(_target_name).gypcmd >!@(find >(ja
va_in_dir)/src >(additional_src_dirs) -name "*.java" # apk))', | 528 'java_sources': ['>!@(find >(java_in_dir)/src >(additional_src_dirs) -na
me "*.java" # apk)'], |
| 529 'java_source_list': '>|(javasources.<(_target_name).gypcmd >@(java_sourc
es))', |
529 | 530 |
530 }, | 531 }, |
531 'inputs': [ | 532 'inputs': [ |
532 '<(DEPTH)/build/android/gyp/util/build_utils.py', | 533 '<(DEPTH)/build/android/gyp/util/build_utils.py', |
533 '<(DEPTH)/build/android/gyp/javac.py', | 534 '<(DEPTH)/build/android/gyp/javac.py', |
| 535 '>@(java_sources)', |
534 '>(java_source_list)', | 536 '>(java_source_list)', |
535 '>@(input_jars_paths)', | 537 '>@(input_jars_paths)', |
536 '<(codegen_stamp)', | 538 '<(codegen_stamp)', |
537 ], | 539 ], |
538 'conditions': [ | 540 'conditions': [ |
539 ['native_lib_target != ""', { | 541 ['native_lib_target != ""', { |
540 'inputs': [ '<(native_libraries_java_stamp)' ], | 542 'inputs': [ '<(native_libraries_java_stamp)' ], |
541 }], | 543 }], |
542 ], | 544 ], |
543 'outputs': [ | 545 'outputs': [ |
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
760 '<(DEPTH)/build/android/ant/apk-package.xml', | 762 '<(DEPTH)/build/android/ant/apk-package.xml', |
761 | 763 |
762 # Add list of inputs to the command line, so if inputs change | 764 # Add list of inputs to the command line, so if inputs change |
763 # (e.g. if a Java file is removed), the command will be re-run. | 765 # (e.g. if a Java file is removed), the command will be re-run. |
764 # TODO(newt): remove this once crbug.com/177552 is fixed in ninja. | 766 # TODO(newt): remove this once crbug.com/177552 is fixed in ninja. |
765 '-DTHIS_IS_IGNORED=>!(echo \'>(_inputs)\' | md5sum)', | 767 '-DTHIS_IS_IGNORED=>!(echo \'>(_inputs)\' | md5sum)', |
766 ] | 768 ] |
767 }, | 769 }, |
768 ], | 770 ], |
769 } | 771 } |
OLD | NEW |