| 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 'gen_src_dirs': [ | 516 'all_src_dirs': [ |
| 517 '<(java_in_dir)/src', |
| 517 '<(intermediate_dir)/gen', | 518 '<(intermediate_dir)/gen', |
| 519 '>@(additional_src_dirs)', |
| 518 '>@(generated_src_dirs)', | 520 '>@(generated_src_dirs)', |
| 519 ], | 521 ], |
| 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) >(additional_src_dirs) -name "*.java"))', | |
| 523 | |
| 524 }, | 522 }, |
| 525 'inputs': [ | 523 'inputs': [ |
| 526 '<(DEPTH)/build/android/gyp/util/build_utils.py', | 524 '<(DEPTH)/build/android/gyp/util/build_utils.py', |
| 527 '<(DEPTH)/build/android/gyp/javac.py', | 525 '<(DEPTH)/build/android/gyp/javac.py', |
| 528 '>(java_source_list)', | 526 # If there is a separate find for additional_src_dirs, it will find the |
| 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-filelist=>(java_source_list)', | 540 '--src-dirs=>(all_src_dirs)', |
| 541 '--src-gendirs=>(gen_src_dirs)', | |
| 542 '--javac-includes=<(javac_includes)', | 541 '--javac-includes=<(javac_includes)', |
| 543 '--chromium-code=<(chromium_code)', | 542 '--chromium-code=<(chromium_code)', |
| 544 '--stamp=<(compile_stamp)', | 543 '--stamp=<(compile_stamp)', |
| 545 | 544 |
| 546 # TODO(newt): remove this once http://crbug.com/177552 is fixed in ninja
. | 545 # TODO(newt): remove this once http://crbug.com/177552 is fixed in ninja
. |
| 547 '--ignore=>!(echo \'>(_inputs)\' | md5sum)', | 546 '--ignore=>!(echo \'>(_inputs)\' | md5sum)', |
| 548 ], | 547 ], |
| 549 }, | 548 }, |
| 550 { | 549 { |
| 551 'variables': { | 550 'variables': { |
| (...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 757 '<(DEPTH)/build/android/ant/apk-package.xml', | 756 '<(DEPTH)/build/android/ant/apk-package.xml', |
| 758 | 757 |
| 759 # Add list of inputs to the command line, so if inputs change | 758 # Add list of inputs to the command line, so if inputs change |
| 760 # (e.g. if a Java file is removed), the command will be re-run. | 759 # (e.g. if a Java file is removed), the command will be re-run. |
| 761 # TODO(newt): remove this once crbug.com/177552 is fixed in ninja. | 760 # TODO(newt): remove this once crbug.com/177552 is fixed in ninja. |
| 762 '-DTHIS_IS_IGNORED=>!(echo \'>(_inputs)\' | md5sum)', | 761 '-DTHIS_IS_IGNORED=>!(echo \'>(_inputs)\' | md5sum)', |
| 763 ] | 762 ] |
| 764 }, | 763 }, |
| 765 ], | 764 ], |
| 766 } | 765 } |
| OLD | NEW |