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

Side by Side Diff: build/java_apk.gypi

Issue 291963002: Convert apk-package-resources.xml to python (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 'javac_includes': [], 95 'javac_includes': [],
96 'jar_excluded_classes': [], 96 'jar_excluded_classes': [],
97 'jar_path': '<(PRODUCT_DIR)/lib.java/<(jar_name)', 97 'jar_path': '<(PRODUCT_DIR)/lib.java/<(jar_name)',
98 'obfuscated_jar_path': '<(intermediate_dir)/obfuscated.jar', 98 'obfuscated_jar_path': '<(intermediate_dir)/obfuscated.jar',
99 'dex_path': '<(intermediate_dir)/classes.dex', 99 'dex_path': '<(intermediate_dir)/classes.dex',
100 'emma_device_jar': '<(android_sdk_root)/tools/lib/emma_device.jar', 100 'emma_device_jar': '<(android_sdk_root)/tools/lib/emma_device.jar',
101 'android_manifest_path%': '<(java_in_dir)/AndroidManifest.xml', 101 'android_manifest_path%': '<(java_in_dir)/AndroidManifest.xml',
102 'push_stamp': '<(intermediate_dir)/push.stamp', 102 'push_stamp': '<(intermediate_dir)/push.stamp',
103 'link_stamp': '<(intermediate_dir)/link.stamp', 103 'link_stamp': '<(intermediate_dir)/link.stamp',
104 'package_resources_stamp': '<(intermediate_dir)/package_resources.stamp', 104 'package_resources_stamp': '<(intermediate_dir)/package_resources.stamp',
105 'crunch_output_dir': '<(intermediate_dir)/res',
106 'resource_packaged_apk_name': '<(apk_name)-resources.ap_',
107 'resource_packaged_apk_path': '<(intermediate_dir)/<(resource_packaged_apk_n ame)',
105 'unsigned_apk_path': '<(intermediate_dir)/<(apk_name)-unsigned.apk', 108 'unsigned_apk_path': '<(intermediate_dir)/<(apk_name)-unsigned.apk',
106 'final_apk_path%': '<(PRODUCT_DIR)/apks/<(apk_name).apk', 109 'final_apk_path%': '<(PRODUCT_DIR)/apks/<(apk_name).apk',
107 'incomplete_apk_path': '<(intermediate_dir)/<(apk_name)-incomplete.apk', 110 'incomplete_apk_path': '<(intermediate_dir)/<(apk_name)-incomplete.apk',
108 'apk_install_record': '<(intermediate_dir)/apk_install.record.stamp', 111 'apk_install_record': '<(intermediate_dir)/apk_install.record.stamp',
109 'device_intermediate_dir': '/data/data/org.chromium.gyp_managed_install/<(_t arget_name)/<(CONFIGURATION_NAME)', 112 'device_intermediate_dir': '/data/data/org.chromium.gyp_managed_install/<(_t arget_name)/<(CONFIGURATION_NAME)',
110 'symlink_script_host_path': '<(intermediate_dir)/create_symlinks.sh', 113 'symlink_script_host_path': '<(intermediate_dir)/create_symlinks.sh',
111 'symlink_script_device_path': '<(device_intermediate_dir)/create_symlinks.sh ', 114 'symlink_script_device_path': '<(device_intermediate_dir)/create_symlinks.sh ',
112 'create_standalone_apk%': 1, 115 'create_standalone_apk%': 1,
113 'variables': { 116 'variables': {
114 'variables': { 117 'variables': {
(...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after
432 '<(DEPTH)/tools/android/md5sum/md5sum.gyp:md5sum', 435 '<(DEPTH)/tools/android/md5sum/md5sum.gyp:md5sum',
433 ], 436 ],
434 'actions': [ 437 'actions': [
435 { 438 {
436 'action_name': 'process_resources', 439 'action_name': 'process_resources',
437 'message': 'processing resources for <(_target_name)', 440 'message': 'processing resources for <(_target_name)',
438 'variables': { 441 'variables': {
439 # Write the inputs list to a file, so that its mtime is updated when 442 # Write the inputs list to a file, so that its mtime is updated when
440 # the list of inputs changes. 443 # the list of inputs changes.
441 'inputs_list_file': '>|(apk_codegen.<(_target_name).gypcmd >@(additional _input_paths) >@(resource_input_paths))', 444 'inputs_list_file': '>|(apk_codegen.<(_target_name).gypcmd >@(additional _input_paths) >@(resource_input_paths))',
442 'resource_additional_options': [],
Yaron 2014/05/20 01:43:37 Just remove from https://codereview.chromium.org/2
cjhopman 2014/05/20 21:01:52 Done.
443 }, 445 },
444 'conditions': [ 446 'conditions': [
445 ['is_test_apk == 1', { 447 ['is_test_apk == 1', {
446 'variables': { 448 'variables': {
447 'additional_res_dirs=': [], 449 'additional_res_dirs=': [],
448 'additional_res_packages=': [], 450 'additional_res_packages=': [],
449 } 451 }
450 }], 452 }],
451 ], 453 ],
452 'inputs': [ 454 'inputs': [
(...skipping 12 matching lines...) Expand all
465 '--android-sdk', '<(android_sdk)', 467 '--android-sdk', '<(android_sdk)',
466 '--android-sdk-tools', '<(android_sdk_tools)', 468 '--android-sdk-tools', '<(android_sdk_tools)',
467 469
468 '--android-manifest', '<(android_manifest_path)', 470 '--android-manifest', '<(android_manifest_path)',
469 '--dependencies-res-dirs', '>(additional_res_dirs)', 471 '--dependencies-res-dirs', '>(additional_res_dirs)',
470 472
471 '--extra-res-packages', '>(additional_res_packages)', 473 '--extra-res-packages', '>(additional_res_packages)',
472 '--extra-r-text-files', '>(additional_R_text_files)', 474 '--extra-r-text-files', '>(additional_R_text_files)',
473 475
474 '--resource-dir', '<(resource_dir)', 476 '--resource-dir', '<(resource_dir)',
475 '--crunch-output-dir', '<(intermediate_dir)/res', 477 '--crunch-output-dir', '<(crunch_output_dir)',
476 478
477 '--R-dir', '<(intermediate_dir)/gen', 479 '--R-dir', '<(intermediate_dir)/gen',
478 480
479 '--stamp', '<(codegen_stamp)', 481 '--stamp', '<(codegen_stamp)',
480 ], 482 ],
481 }, 483 },
482 { 484 {
483 'action_name': 'javac_<(_target_name)', 485 'action_name': 'javac_<(_target_name)',
484 'message': 'Compiling java for <(_target_name)', 486 'message': 'Compiling java for <(_target_name)',
485 'variables': { 487 'variables': {
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
635 'output_path': '<(dex_path)', 637 'output_path': '<(dex_path)',
636 'proguard_enabled_input_path': '<(obfuscated_jar_path)', 638 'proguard_enabled_input_path': '<(obfuscated_jar_path)',
637 }, 639 },
638 'conditions': [ 640 'conditions': [
639 ['proguard_enabled == "true"', { 'inputs': [ '<(obfuscate_stamp)' ] }, 641 ['proguard_enabled == "true"', { 'inputs': [ '<(obfuscate_stamp)' ] },
640 { 'inputs': [ '<(instr_stamp)' ] }], 642 { 'inputs': [ '<(instr_stamp)' ] }],
641 ], 643 ],
642 'includes': [ 'android/dex_action.gypi' ], 644 'includes': [ 'android/dex_action.gypi' ],
643 }, 645 },
644 { 646 {
645 'action_name': 'ant package resources', 647 'action_name': 'package_resources',
646 'message': 'Packaging resources for <(_target_name) APK', 648 'message': 'packaging resources for <(_target_name)',
647 'inputs': [ 649 'variables': {
648 '<(DEPTH)/build/android/ant/apk-package-resources.xml', 650 'extra_package_input_paths': [
Yaron 2014/05/20 01:43:37 Is this not going to resolve 351928?
cjhopman 2014/05/20 21:01:52 It's not. One easy way for these inputs to be inco
649 '<(DEPTH)/build/android/gyp/util/build_utils.py', 651 '>@(package_input_paths)',
650 '<(DEPTH)/build/android/gyp/ant.py', 652 '>@(additional_input_paths)',
651 '<(android_manifest_path)', 653 '>@(resource_input_paths)'
652 '<(codegen_stamp)', 654 ],
653 # TODO: This isn't always rerun correctly, http://crbug.com/351928 655 'package_resource_dirs': [
654 656 # <(crunch_output_dir) must come before <(resource_dir) so that
655 '>@(additional_input_paths)', 657 # the crunched files take precedence.
656 ], 658 '<(crunch_output_dir)',
659 '<(resource_dir)',
660 '>@(additional_res_dirs)',
661 ],
662 # Write the inputs list to a file, so that its mtime is updated when
663 # the list of inputs changes.
664 'inputs_list_file': '>|(apk_package.<(_target_name).gypcmd >@(extra_pack age_input_paths))',
665 },
657 'conditions': [ 666 'conditions': [
658 ['is_test_apk == 1', { 667 ['is_test_apk == 1', {
659 'variables': { 668 'variables': {
660 'additional_res_dirs=': [], 669 'additional_res_dirs=': [],
661 'additional_res_packages=': [], 670 'additional_res_packages=': [],
662 } 671 }
663 }], 672 }],
664 ], 673 ],
674 'inputs': [
675 # TODO: This isn't always rerun correctly, http://crbug.com/351928
676 '<(DEPTH)/build/android/gyp/util/build_utils.py',
677 '<(DEPTH)/build/android/gyp/package_resources.py',
678 '<(android_manifest_path)',
679
680 '<(codegen_stamp)',
681
682 '>@(extra_package_input_paths)',
683 '>(inputs_list_file)',
684 ],
665 'outputs': [ 685 'outputs': [
666 '<(package_resources_stamp)', 686 '<(resource_packaged_apk_path)',
667 ], 687 ],
668 'action': [ 688 'action': [
669 'python', '<(DEPTH)/build/android/gyp/ant.py', 689 'python', '<(DEPTH)/build/android/gyp/package_resources.py',
670 '-quiet', 690 '--android-sdk', '<(android_sdk)',
671 '-DADDITIONAL_RES_DIRS=>(additional_res_dirs)', 691 '--android-sdk-tools', '<(android_sdk_tools)',
672 '-DADDITIONAL_RES_PACKAGES=>(additional_res_packages)',
673 '-DADDITIONAL_R_TEXT_FILES=>(additional_R_text_files)',
674 '-DANDROID_MANIFEST=<(android_manifest_path)',
675 '-DANDROID_SDK_JAR=<(android_sdk_jar)',
676 '-DANDROID_SDK_ROOT=<(android_sdk_root)',
677 '-DANDROID_SDK_TOOLS=<(android_sdk_tools)',
678 '-DAPK_NAME=<(apk_name)',
679 '-DAPP_MANIFEST_VERSION_CODE=<(app_manifest_version_code)',
680 '-DAPP_MANIFEST_VERSION_NAME=<(app_manifest_version_name)',
681 '-DASSET_DIR=<(asset_location)',
682 '-DCONFIGURATION_NAME=<(CONFIGURATION_NAME)',
683 '-DOUT_DIR=<(intermediate_dir)',
684 '-DRESOURCE_DIR=<(resource_dir)',
685 692
686 '-DSTAMP=<(package_resources_stamp)', 693 '--configuration-name', '<(CONFIGURATION_NAME)',
687 694
688 '-Dbasedir=.', 695 '--android-manifest', '<(android_manifest_path)',
689 '-buildfile', 696 '--version-code', '<(app_manifest_version_code)',
690 '<(DEPTH)/build/android/ant/apk-package-resources.xml', 697 '--version-name', '<(app_manifest_version_name)',
691 ] 698
699 '--asset-dir', '<(asset_location)',
700 '--resource-dirs', '>(package_resource_dirs)',
701
702 '--apk-path', '<(resource_packaged_apk_path)',
703 ],
692 }, 704 },
693 { 705 {
694 'action_name': 'ant_package_<(_target_name)', 706 'action_name': 'ant_package_<(_target_name)',
695 'message': 'Packaging <(_target_name)', 707 'message': 'Packaging <(_target_name)',
696 'variables': { 708 'variables': {
697 # Write the inputs list to a file, so that its mtime is updated when 709 # Write the inputs list to a file, so that its mtime is updated when
698 # the list of inputs changes. 710 # the list of inputs changes.
699 'inputs_list_file': '>|(apk_package.<(_target_name).gypcmd >@(package_in put_paths))' 711 'inputs_list_file': '>|(apk_package.<(_target_name).gypcmd >@(package_in put_paths))'
700 }, 712 },
701 'inputs': [ 713 'inputs': [
702 '<(DEPTH)/build/android/ant/apk-package.xml', 714 '<(DEPTH)/build/android/ant/apk-package.xml',
703 '<(DEPTH)/build/android/gyp/util/build_utils.py', 715 '<(DEPTH)/build/android/gyp/util/build_utils.py',
704 '<(DEPTH)/build/android/gyp/ant.py', 716 '<(DEPTH)/build/android/gyp/ant.py',
705 '<(dex_path)', 717 '<(dex_path)',
706 '<(codegen_stamp)', 718 '<(codegen_stamp)',
707 '<(obfuscate_stamp)', 719 '<(obfuscate_stamp)',
708 '<(package_resources_stamp)', 720 '<(resource_packaged_apk_path)',
709 '>@(package_input_paths)', 721 '>@(package_input_paths)',
710 '>(inputs_list_file)', 722 '>(inputs_list_file)',
711 ], 723 ],
712 'outputs': [ 724 'outputs': [
713 '<(unsigned_apk_path)', 725 '<(unsigned_apk_path)',
714 ], 726 ],
715 'action': [ 727 'action': [
716 'python', '<(DEPTH)/build/android/gyp/ant.py', 728 'python', '<(DEPTH)/build/android/gyp/ant.py',
717 '-quiet', 729 '-quiet',
718 '-DANDROID_SDK_ROOT=<(android_sdk_root)', 730 '-DANDROID_SDK_ROOT=<(android_sdk_root)',
719 '-DANDROID_SDK_TOOLS=<(android_sdk_tools)', 731 '-DANDROID_SDK_TOOLS=<(android_sdk_tools)',
732 '-DRESOURCE_PACKAGED_APK_NAME=<(resource_packaged_apk_name)',
720 '-DAPK_NAME=<(apk_name)', 733 '-DAPK_NAME=<(apk_name)',
721 '-DCONFIGURATION_NAME=<(CONFIGURATION_NAME)', 734 '-DCONFIGURATION_NAME=<(CONFIGURATION_NAME)',
722 '-DNATIVE_LIBS_DIR=<(apk_package_native_libs_dir)', 735 '-DNATIVE_LIBS_DIR=<(apk_package_native_libs_dir)',
723 '-DOUT_DIR=<(intermediate_dir)', 736 '-DOUT_DIR=<(intermediate_dir)',
724 '-DUNSIGNED_APK_PATH=<(unsigned_apk_path)', 737 '-DUNSIGNED_APK_PATH=<(unsigned_apk_path)',
725 '-DEMMA_INSTRUMENT=<(emma_instrument)', 738 '-DEMMA_INSTRUMENT=<(emma_instrument)',
726 '-DEMMA_DEVICE_JAR=<(emma_device_jar)', 739 '-DEMMA_DEVICE_JAR=<(emma_device_jar)',
727 740
728 '-Dbasedir=.', 741 '-Dbasedir=.',
729 '-buildfile', 742 '-buildfile',
730 '<(DEPTH)/build/android/ant/apk-package.xml', 743 '<(DEPTH)/build/android/ant/apk-package.xml',
731 ] 744 ]
732 }, 745 },
733 ], 746 ],
734 } 747 }
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