Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(38)

Side by Side Diff: build/java_apk.gypi

Issue 193693002: android: Pass (non-generated) .java files via a gyp filelist to javac.py (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: addsrc Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « build/java.gypi ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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',
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 # TODO(thakis): Gyp caches >! evaluation by command. Both java.gypi and
523 # java_apk.gypi evaluate the same command, and at the moment two targets
524 # set java_in_dir to "java". Add a dummy comment here to make sure
525 # that the two targets (one uses java.gypi, the other java_apk.gypi)
526 # get distinct source lists. Medium-term, make targets list all their
527 # Java files instead of using find. (As is, this will be broken if two
528 # targets use the same java_in_dir and both use java_apk.gypi or
529 # both use java.gypi.)
530 'java_source_list': '>|(javasources.<(_target_name).gypcmd >!@(find >(ja va_in_dir)/src >(additional_src_dirs) -name "*.java" # apk))',
531
522 }, 532 },
523 'inputs': [ 533 'inputs': [
524 '<(DEPTH)/build/android/gyp/util/build_utils.py', 534 '<(DEPTH)/build/android/gyp/util/build_utils.py',
525 '<(DEPTH)/build/android/gyp/javac.py', 535 '<(DEPTH)/build/android/gyp/javac.py',
526 # If there is a separate find for additional_src_dirs, it will find the 536 '>(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)', 537 '>@(input_jars_paths)',
530 '<(codegen_stamp)', 538 '<(codegen_stamp)',
531 '>@(compile_input_paths)', 539 '>@(compile_input_paths)',
532 ], 540 ],
533 'outputs': [ 541 'outputs': [
534 '<(compile_stamp)', 542 '<(compile_stamp)',
535 ], 543 ],
536 'action': [ 544 'action': [
537 'python', '<(DEPTH)/build/android/gyp/javac.py', 545 'python', '<(DEPTH)/build/android/gyp/javac.py',
538 '--output-dir=<(classes_dir)', 546 '--output-dir=<(classes_dir)',
539 '--classpath=>(input_jars_paths) <(android_sdk_jar)', 547 '--classpath=>(input_jars_paths) <(android_sdk_jar)',
540 '--src-dirs=>(all_src_dirs)', 548 '--src-filelist=>(java_source_list)',
549 '--src-gendirs=>(gen_src_dirs)',
541 '--javac-includes=<(javac_includes)', 550 '--javac-includes=<(javac_includes)',
542 '--chromium-code=<(chromium_code)', 551 '--chromium-code=<(chromium_code)',
543 '--stamp=<(compile_stamp)', 552 '--stamp=<(compile_stamp)',
544 553
545 # TODO(newt): remove this once http://crbug.com/177552 is fixed in ninja . 554 # TODO(newt): remove this once http://crbug.com/177552 is fixed in ninja .
546 '--ignore=>!(echo \'>(_inputs)\' | md5sum)', 555 '--ignore=>!(echo \'>(_inputs)\' | md5sum)',
547 ], 556 ],
548 }, 557 },
549 { 558 {
550 'variables': { 559 'variables': {
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
756 '<(DEPTH)/build/android/ant/apk-package.xml', 765 '<(DEPTH)/build/android/ant/apk-package.xml',
757 766
758 # Add list of inputs to the command line, so if inputs change 767 # Add list of inputs to the command line, so if inputs change
759 # (e.g. if a Java file is removed), the command will be re-run. 768 # (e.g. if a Java file is removed), the command will be re-run.
760 # TODO(newt): remove this once crbug.com/177552 is fixed in ninja. 769 # TODO(newt): remove this once crbug.com/177552 is fixed in ninja.
761 '-DTHIS_IS_IGNORED=>!(echo \'>(_inputs)\' | md5sum)', 770 '-DTHIS_IS_IGNORED=>!(echo \'>(_inputs)\' | md5sum)',
762 ] 771 ]
763 }, 772 },
764 ], 773 ],
765 } 774 }
OLDNEW
« no previous file with comments | « build/java.gypi ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698