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 495 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
506 # Add list of inputs to the command line, so if inputs change | 506 # Add list of inputs to the command line, so if inputs change |
507 # (e.g. if a Java file is removed), the command will be re-run. | 507 # (e.g. if a Java file is removed), the command will be re-run. |
508 # TODO(newt): remove this once crbug.com/177552 is fixed in ninja. | 508 # TODO(newt): remove this once crbug.com/177552 is fixed in ninja. |
509 '-DTHIS_IS_IGNORED=>!(echo \'>(_inputs)\' | md5sum)', | 509 '-DTHIS_IS_IGNORED=>!(echo \'>(_inputs)\' | md5sum)', |
510 ], | 510 ], |
511 }, | 511 }, |
512 { | 512 { |
513 'action_name': 'javac_<(_target_name)', | 513 'action_name': 'javac_<(_target_name)', |
514 'message': 'Compiling java for <(_target_name)', | 514 'message': 'Compiling java for <(_target_name)', |
515 'variables': { | 515 'variables': { |
516 'all_src_dirs': [ | 516 'gen_src_dirs': [ |
517 '<(java_in_dir)/src', | |
518 '<(intermediate_dir)/gen', | 517 '<(intermediate_dir)/gen', |
cjhopman
2014/03/11 01:35:57
Ugh, this path is another hidden dependency (it is
| |
519 '>@(additional_src_dirs)', | |
520 '>@(generated_src_dirs)', | 518 '>@(generated_src_dirs)', |
521 ], | 519 ], |
520 # If there is a separate find for additional_src_dirs, it will find the | |
521 # wrong .java files when additional_src_dirs is empty. | |
522 'java_source_list': '>|(javasources.<(_target_name).gypcmd >!@(find >(ja va_in_dir)/src >(additional_src_dirs) -name "*.java"))', | |
Nico
2014/03/11 01:41:59
I changed the >(java_in_dir) on the lhs to >(java_
| |
523 | |
522 }, | 524 }, |
523 'inputs': [ | 525 'inputs': [ |
524 '<(DEPTH)/build/android/gyp/util/build_utils.py', | 526 '<(DEPTH)/build/android/gyp/util/build_utils.py', |
525 '<(DEPTH)/build/android/gyp/javac.py', | 527 '<(DEPTH)/build/android/gyp/javac.py', |
526 # If there is a separate find for additional_src_dirs, it will find the | 528 '>(java_source_list)', |
527 # wrong .java files when additional_src_dirs is empty. | |
528 '>!@(find >(java_in_dir) >(additional_src_dirs) -name "*.java")', | |
529 '>@(input_jars_paths)', | 529 '>@(input_jars_paths)', |
530 '<(codegen_stamp)', | 530 '<(codegen_stamp)', |
531 '>@(compile_input_paths)', | 531 '>@(compile_input_paths)', |
532 ], | 532 ], |
533 'outputs': [ | 533 'outputs': [ |
534 '<(compile_stamp)', | 534 '<(compile_stamp)', |
535 ], | 535 ], |
536 'action': [ | 536 'action': [ |
537 'python', '<(DEPTH)/build/android/gyp/javac.py', | 537 'python', '<(DEPTH)/build/android/gyp/javac.py', |
538 '--output-dir=<(classes_dir)', | 538 '--output-dir=<(classes_dir)', |
539 '--classpath=>(input_jars_paths) <(android_sdk_jar)', | 539 '--classpath=>(input_jars_paths) <(android_sdk_jar)', |
540 '--src-dirs=>(all_src_dirs)', | 540 '--src-filelist=>(java_source_list)', |
541 '--src-gendirs=>(gen_src_dirs)', | |
541 '--javac-includes=<(javac_includes)', | 542 '--javac-includes=<(javac_includes)', |
542 '--chromium-code=<(chromium_code)', | 543 '--chromium-code=<(chromium_code)', |
543 '--stamp=<(compile_stamp)', | 544 '--stamp=<(compile_stamp)', |
544 | 545 |
545 # TODO(newt): remove this once http://crbug.com/177552 is fixed in ninja . | 546 # TODO(newt): remove this once http://crbug.com/177552 is fixed in ninja . |
546 '--ignore=>!(echo \'>(_inputs)\' | md5sum)', | 547 '--ignore=>!(echo \'>(_inputs)\' | md5sum)', |
547 ], | 548 ], |
548 }, | 549 }, |
549 { | 550 { |
550 'variables': { | 551 'variables': { |
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
753 '<(DEPTH)/build/android/ant/apk-package.xml', | 754 '<(DEPTH)/build/android/ant/apk-package.xml', |
754 | 755 |
755 # Add list of inputs to the command line, so if inputs change | 756 # Add list of inputs to the command line, so if inputs change |
756 # (e.g. if a Java file is removed), the command will be re-run. | 757 # (e.g. if a Java file is removed), the command will be re-run. |
757 # TODO(newt): remove this once crbug.com/177552 is fixed in ninja. | 758 # TODO(newt): remove this once crbug.com/177552 is fixed in ninja. |
758 '-DTHIS_IS_IGNORED=>!(echo \'>(_inputs)\' | md5sum)', | 759 '-DTHIS_IS_IGNORED=>!(echo \'>(_inputs)\' | md5sum)', |
759 ] | 760 ] |
760 }, | 761 }, |
761 ], | 762 ], |
762 } | 763 } |
OLD | NEW |