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 26 matching lines...) Expand all Loading... |
37 # input_jars_paths - The path to jars to be included in the classpath. This | 37 # input_jars_paths - The path to jars to be included in the classpath. This |
38 # should be filled automatically by depending on the appropriate targets. | 38 # should be filled automatically by depending on the appropriate targets. |
39 # is_test_apk - Set to 1 if building a test apk. This prevents resources from | 39 # is_test_apk - Set to 1 if building a test apk. This prevents resources from |
40 # dependencies from being re-included. | 40 # dependencies from being re-included. |
41 # native_lib_target - The target_name of the target which generates the final | 41 # native_lib_target - The target_name of the target which generates the final |
42 # shared library to be included in this apk. A stripped copy of the | 42 # shared library to be included in this apk. A stripped copy of the |
43 # library will be included in the apk. | 43 # library will be included in the apk. |
44 # resource_dir - The directory for resources. | 44 # resource_dir - The directory for resources. |
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 # java_strings_grd - The name of the grd file from which to generate localized | |
48 # strings.xml files, if any. | |
49 # 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 |
50 # RELRO section of the native libraries between the different processes. | 48 # RELRO section of the native libraries between the different processes. |
51 # enable_chromium_linker_tests - Enable the content dynamic linker test support | 49 # enable_chromium_linker_tests - Enable the content dynamic linker test support |
52 # 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 |
53 # 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!! |
54 # 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. |
55 { | 53 { |
56 'variables': { | 54 'variables': { |
57 'additional_input_paths': [], | 55 'additional_input_paths': [], |
58 'input_jars_paths': [], | 56 'input_jars_paths': [], |
59 'library_dexed_jars_paths': [], | 57 'library_dexed_jars_paths': [], |
60 'additional_src_dirs': [], | 58 'additional_src_dirs': [], |
61 'generated_src_dirs': [], | 59 'generated_src_dirs': [], |
62 'app_manifest_version_name%': '<(android_app_version_name)', | 60 'app_manifest_version_name%': '<(android_app_version_name)', |
63 'app_manifest_version_code%': '<(android_app_version_code)', | 61 'app_manifest_version_code%': '<(android_app_version_code)', |
64 'proguard_enabled%': 'false', | 62 'proguard_enabled%': 'false', |
65 'proguard_flags_paths%': ['<(DEPTH)/build/android/empty_proguard.flags'], | 63 'proguard_flags_paths%': ['<(DEPTH)/build/android/empty_proguard.flags'], |
66 'jar_name': 'chromium_apk_<(_target_name).jar', | 64 'jar_name': 'chromium_apk_<(_target_name).jar', |
67 'resource_dir%':'<(DEPTH)/build/android/ant/empty/res', | 65 'resource_dir%':'<(DEPTH)/build/android/ant/empty/res', |
68 'R_package%':'', | 66 'R_package%':'', |
69 'additional_R_text_files': [], | 67 'additional_R_text_files': [], |
70 'additional_res_dirs': [], | 68 'additional_res_dirs': [], |
71 'additional_res_packages': [], | 69 'additional_res_packages': [], |
72 'is_test_apk%': 0, | 70 'is_test_apk%': 0, |
73 'java_strings_grd%': '', | |
74 'resource_input_paths': [], | 71 'resource_input_paths': [], |
75 'intermediate_dir': '<(PRODUCT_DIR)/<(_target_name)', | 72 'intermediate_dir': '<(PRODUCT_DIR)/<(_target_name)', |
76 'asset_location%': '<(intermediate_dir)/assets', | 73 'asset_location%': '<(intermediate_dir)/assets', |
77 'codegen_stamp': '<(intermediate_dir)/codegen.stamp', | 74 'codegen_stamp': '<(intermediate_dir)/codegen.stamp', |
78 'package_input_paths': [], | 75 'package_input_paths': [], |
79 'ordered_libraries_file': '<(intermediate_dir)/native_libraries.json', | 76 'ordered_libraries_file': '<(intermediate_dir)/native_libraries.json', |
80 'native_libraries_template': '<(DEPTH)/base/android/java/templates/NativeLib
raries.template', | 77 'native_libraries_template': '<(DEPTH)/base/android/java/templates/NativeLib
raries.template', |
81 'native_libraries_java_dir': '<(intermediate_dir)/native_libraries_java/', | 78 'native_libraries_java_dir': '<(intermediate_dir)/native_libraries_java/', |
82 'native_libraries_java_file': '<(native_libraries_java_dir)/NativeLibraries.
java', | 79 'native_libraries_java_file': '<(native_libraries_java_dir)/NativeLibraries.
java', |
83 'native_libraries_java_stamp': '<(intermediate_dir)/native_libraries_java.st
amp', | 80 'native_libraries_java_stamp': '<(intermediate_dir)/native_libraries_java.st
amp', |
(...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
386 { | 383 { |
387 'action_name': 'finalize standalone apk', | 384 'action_name': 'finalize standalone apk', |
388 'variables': { | 385 'variables': { |
389 'input_apk_path': '<(unsigned_standalone_apk_path)', | 386 'input_apk_path': '<(unsigned_standalone_apk_path)', |
390 'output_apk_path': '<(final_apk_path)', | 387 'output_apk_path': '<(final_apk_path)', |
391 }, | 388 }, |
392 'includes': [ 'android/finalize_apk_action.gypi'] | 389 'includes': [ 'android/finalize_apk_action.gypi'] |
393 }, | 390 }, |
394 ], | 391 ], |
395 }], | 392 }], |
396 ['java_strings_grd != ""', { | |
397 'variables': { | |
398 'res_grit_dir': '<(SHARED_INTERMEDIATE_DIR)/<(package_name)_apk/res_grit
', | |
399 'additional_res_dirs': ['<(res_grit_dir)'], | |
400 # grit_grd_file is used by grit_action.gypi, included below. | |
401 'grit_grd_file': '<(java_in_dir)/strings/<(java_strings_grd)', | |
402 'resource_input_paths': [ | |
403 '<!@pymod_do_main(grit_info <@(grit_defines) --outputs "<(res_grit_dir
)" <(grit_grd_file))' | |
404 ], | |
405 }, | |
406 'actions': [ | |
407 { | |
408 'action_name': 'generate_localized_strings_xml', | |
409 'variables': { | |
410 'grit_additional_defines': ['-E', 'ANDROID_JAVA_TAGGED_ONLY=false'], | |
411 'grit_out_dir': '<(res_grit_dir)', | |
412 # resource_ids is unneeded since we don't generate .h headers. | |
413 'grit_resource_ids': '', | |
414 }, | |
415 'includes': ['../build/grit_action.gypi'], | |
416 }, | |
417 ], | |
418 }], | |
419 ['gyp_managed_install == 1', { | 393 ['gyp_managed_install == 1', { |
420 'actions': [ | 394 'actions': [ |
421 { | 395 { |
422 'action_name': 'finalize incomplete apk', | 396 'action_name': 'finalize incomplete apk', |
423 'variables': { | 397 'variables': { |
424 'input_apk_path': '<(unsigned_apk_path)', | 398 'input_apk_path': '<(unsigned_apk_path)', |
425 'output_apk_path': '<(incomplete_apk_path)', | 399 'output_apk_path': '<(incomplete_apk_path)', |
426 }, | 400 }, |
427 'includes': [ 'android/finalize_apk_action.gypi'] | 401 'includes': [ 'android/finalize_apk_action.gypi'] |
428 }, | 402 }, |
(...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
752 '-DEMMA_INSTRUMENT=<(emma_instrument)', | 726 '-DEMMA_INSTRUMENT=<(emma_instrument)', |
753 '-DEMMA_DEVICE_JAR=<(emma_device_jar)', | 727 '-DEMMA_DEVICE_JAR=<(emma_device_jar)', |
754 | 728 |
755 '-Dbasedir=.', | 729 '-Dbasedir=.', |
756 '-buildfile', | 730 '-buildfile', |
757 '<(DEPTH)/build/android/ant/apk-package.xml', | 731 '<(DEPTH)/build/android/ant/apk-package.xml', |
758 ] | 732 ] |
759 }, | 733 }, |
760 ], | 734 ], |
761 } | 735 } |
OLD | NEW |