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

Side by Side Diff: build/java_apk.gypi

Issue 313273004: Make test apks only dex files not in tested apk (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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/android/gyp/dex.py ('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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 # R_package - A custom Java package to generate the resource file R.java in. 45 # R_package - A custom Java package to generate the resource file R.java in.
46 # By default, the package given in AndroidManifest.xml will be used. 46 # By default, the package given in AndroidManifest.xml will be used.
47 # use_chromium_linker - Enable the content dynamic linker that allows sharing t he 47 # use_chromium_linker - Enable the content dynamic linker that allows sharing t he
48 # RELRO section of the native libraries between the different processes. 48 # RELRO section of the native libraries between the different processes.
49 # enable_chromium_linker_tests - Enable the content dynamic linker test support 49 # enable_chromium_linker_tests - Enable the content dynamic linker test support
50 # code. This allows a test APK to inject a Linker.TestRunner instance at 50 # code. This allows a test APK to inject a Linker.TestRunner instance at
51 # runtime. Should only be used by the chromium_linker_test_apk target!! 51 # runtime. Should only be used by the chromium_linker_test_apk target!!
52 # never_lint - Set to 1 to not run lint on this target. 52 # never_lint - Set to 1 to not run lint on this target.
53 { 53 {
54 'variables': { 54 'variables': {
55 'tested_apk_dex_path%': '/',
55 'additional_input_paths': [], 56 'additional_input_paths': [],
56 'input_jars_paths': [], 57 'input_jars_paths': [],
57 'library_dexed_jars_paths': [], 58 'library_dexed_jars_paths': [],
58 'additional_src_dirs': [], 59 'additional_src_dirs': [],
59 'generated_src_dirs': [], 60 'generated_src_dirs': [],
60 'app_manifest_version_name%': '<(android_app_version_name)', 61 'app_manifest_version_name%': '<(android_app_version_name)',
61 'app_manifest_version_code%': '<(android_app_version_code)', 62 'app_manifest_version_code%': '<(android_app_version_code)',
62 # aapt generates this proguard.txt. 63 # aapt generates this proguard.txt.
63 'generated_proguard_file': '<(intermediate_dir)/proguard.txt', 64 'generated_proguard_file': '<(intermediate_dir)/proguard.txt',
64 'proguard_enabled%': 'false', 65 'proguard_enabled%': 'false',
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
143 ], 144 ],
144 }, 145 },
145 'native_lib_target%': '', 146 'native_lib_target%': '',
146 'native_lib_version_name%': '', 147 'native_lib_version_name%': '',
147 'use_chromium_linker%' : 0, 148 'use_chromium_linker%' : 0,
148 'enable_chromium_linker_tests%': 0, 149 'enable_chromium_linker_tests%': 0,
149 'emma_instrument%': '<(emma_instrument)', 150 'emma_instrument%': '<(emma_instrument)',
150 'apk_package_native_libs_dir': '<(apk_package_native_libs_dir)', 151 'apk_package_native_libs_dir': '<(apk_package_native_libs_dir)',
151 'unsigned_standalone_apk_path': '<(unsigned_standalone_apk_path)', 152 'unsigned_standalone_apk_path': '<(unsigned_standalone_apk_path)',
152 'extra_native_libs': [], 153 'extra_native_libs': [],
154 'apk_dex_input_paths': [ '>@(library_dexed_jars_paths)' ],
153 }, 155 },
154 # Pass the jar path to the apk's "fake" jar target. This would be better as 156 # Pass the jar path to the apk's "fake" jar target. This would be better as
155 # direct_dependent_settings, but a variable set by a direct_dependent_settings 157 # direct_dependent_settings, but a variable set by a direct_dependent_settings
156 # cannot be lifted in a dependent to all_dependent_settings. 158 # cannot be lifted in a dependent to all_dependent_settings.
157 'all_dependent_settings': { 159 'all_dependent_settings': {
158 'variables': { 160 'variables': {
159 'apk_output_jar_path': '<(jar_path)', 161 'apk_output_jar_path': '<(jar_path)',
162 'tested_apk_dex_path': '<(dex_path)',
160 }, 163 },
161 }, 164 },
162 'conditions': [ 165 'conditions': [
163 ['resource_dir!=""', { 166 ['resource_dir!=""', {
164 'variables': { 167 'variables': {
165 'resource_input_paths': [ '<!@(find <(resource_dir) -name "*")' ] 168 'resource_input_paths': [ '<!@(find <(resource_dir) -name "*")' ]
166 }, 169 },
167 }], 170 }],
168 ['R_package != ""', { 171 ['R_package != ""', {
169 'variables': { 172 'variables': {
(...skipping 486 matching lines...) Expand 10 before | Expand all | Expand 10 after
656 659
657 '--proguard-config-files=<(proguard_flags_paths)', 660 '--proguard-config-files=<(proguard_flags_paths)',
658 '--stamp', '<(obfuscate_stamp)', 661 '--stamp', '<(obfuscate_stamp)',
659 662
660 '<@(additional_obfuscate_options)', 663 '<@(additional_obfuscate_options)',
661 ], 664 ],
662 }, 665 },
663 { 666 {
664 'action_name': 'dex_<(_target_name)', 667 'action_name': 'dex_<(_target_name)',
665 'variables': { 668 'variables': {
666 'conditions': [ 669 'output_path': '<(dex_path)',
667 ['emma_instrument != 0', { 670 'dex_input_paths': [
668 'dex_no_locals': 1, 671 '>@(apk_dex_input_paths)',
669 'dex_input_paths': [ '<(emma_device_jar)' ], 672 '<(jar_path)',
670 }],
671 ], 673 ],
672 'dex_input_paths': [ '>@(library_dexed_jars_paths)' ],
673 'dex_generated_input_dirs': [ '<(classes_final_dir)' ],
674 'output_path': '<(dex_path)',
675 'proguard_enabled_input_path': '<(obfuscated_jar_path)', 674 'proguard_enabled_input_path': '<(obfuscated_jar_path)',
676 }, 675 },
676 'target_conditions': [
677 ['emma_instrument != 0', {
678 'dex_no_locals': 1,
679 'dex_input_paths': [
680 '<(emma_device_jar)'
681 ],
682 }],
683 ['is_test_apk == 1 and tested_apk_dex_path != "/"', {
684 'variables': {
685 'dex_additional_options': [
686 '--excluded-paths-file', '>(tested_apk_dex_path).inputs'
687 ],
688 },
689 'inputs': [
690 '>(tested_apk_dex_path).inputs',
691 ],
692 }],
693 ],
677 'conditions': [ 694 'conditions': [
678 ['proguard_enabled == "true"', { 'inputs': [ '<(obfuscate_stamp)' ] }, 695 ['proguard_enabled == "true"', {
679 { 'inputs': [ '<(instr_stamp)' ] }], 696 'inputs': [ '<(obfuscate_stamp)' ]
697 }, {
698 'inputs': [ '<(instr_stamp)' ]
699 }],
680 ], 700 ],
681 'includes': [ 'android/dex_action.gypi' ], 701 'includes': [ 'android/dex_action.gypi' ],
682 }, 702 },
683 { 703 {
684 'action_name': 'package_resources', 704 'action_name': 'package_resources',
685 'message': 'packaging resources for <(_target_name)', 705 'message': 'packaging resources for <(_target_name)',
686 'variables': { 706 'variables': {
687 'package_resource_zip_input_paths': [ 707 'package_resource_zip_input_paths': [
688 '<(resource_zip_path)', 708 '<(resource_zip_path)',
689 '>@(dependencies_res_zip_paths)', 709 '>@(dependencies_res_zip_paths)',
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
763 '-DEMMA_INSTRUMENT=<(emma_instrument)', 783 '-DEMMA_INSTRUMENT=<(emma_instrument)',
764 '-DEMMA_DEVICE_JAR=<(emma_device_jar)', 784 '-DEMMA_DEVICE_JAR=<(emma_device_jar)',
765 785
766 '-Dbasedir=.', 786 '-Dbasedir=.',
767 '-buildfile', 787 '-buildfile',
768 '<(DEPTH)/build/android/ant/apk-package.xml', 788 '<(DEPTH)/build/android/ant/apk-package.xml',
769 ] 789 ]
770 }, 790 },
771 ], 791 ],
772 } 792 }
OLDNEW
« no previous file with comments | « build/android/gyp/dex.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698