| 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 137 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|   148     'multidex_configuration_path': '<(intermediate_dir)/multidex_config.json', |   148     'multidex_configuration_path': '<(intermediate_dir)/multidex_config.json', | 
|   149     'main_dex_list_path': '<(intermediate_dir)/main_dex_list.txt', |   149     'main_dex_list_path': '<(intermediate_dir)/main_dex_list.txt', | 
|   150     'emma_device_jar': '<(android_sdk_root)/tools/lib/emma_device.jar', |   150     'emma_device_jar': '<(android_sdk_root)/tools/lib/emma_device.jar', | 
|   151     'android_manifest_path%': '<(java_in_dir)/AndroidManifest.xml', |   151     'android_manifest_path%': '<(java_in_dir)/AndroidManifest.xml', | 
|   152     'split_android_manifest_path': '<(intermediate_dir)/split-manifests/<(androi
      d_app_abi)/AndroidManifest.xml', |   152     'split_android_manifest_path': '<(intermediate_dir)/split-manifests/<(androi
      d_app_abi)/AndroidManifest.xml', | 
|   153     'push_stamp': '<(intermediate_dir)/push.stamp', |   153     'push_stamp': '<(intermediate_dir)/push.stamp', | 
|   154     'link_stamp': '<(intermediate_dir)/link.stamp', |   154     'link_stamp': '<(intermediate_dir)/link.stamp', | 
|   155     'resource_zip_path': '<(intermediate_dir)/<(_target_name).resources.zip', |   155     'resource_zip_path': '<(intermediate_dir)/<(_target_name).resources.zip', | 
|   156     'shared_resources%': 0, |   156     'shared_resources%': 0, | 
|   157     'app_as_shared_library%': 0, |   157     'app_as_shared_library%': 0, | 
|   158     'final_apk_path%': '<(PRODUCT_DIR)/apks/<(apk_name).apk', |  | 
|   159     'final_apk_path_no_extension%': '<(PRODUCT_DIR)/apks/<(apk_name)', |   158     'final_apk_path_no_extension%': '<(PRODUCT_DIR)/apks/<(apk_name)', | 
|   160     'final_abi_split_apk_path%': '<(PRODUCT_DIR)/apks/<(apk_name)-abi-<(android_
      app_abi).apk', |   159     'final_abi_split_apk_path%': '<(PRODUCT_DIR)/apks/<(apk_name)-abi-<(android_
      app_abi).apk', | 
|   161     'incomplete_apk_path': '<(intermediate_dir)/<(apk_name)-incomplete.apk', |   160     'incomplete_apk_path': '<(intermediate_dir)/<(apk_name)-incomplete.apk', | 
|   162     'apk_install_record': '<(intermediate_dir)/apk_install.record.stamp', |   161     'apk_install_record': '<(intermediate_dir)/apk_install.record.stamp', | 
|   163     'device_intermediate_dir': '/data/data/org.chromium.gyp_managed_install/<(_t
      arget_name)/<(CONFIGURATION_NAME)', |   162     'device_intermediate_dir': '/data/data/org.chromium.gyp_managed_install/<(_t
      arget_name)/<(CONFIGURATION_NAME)', | 
|   164     'symlink_script_host_path': '<(intermediate_dir)/create_symlinks.sh', |   163     'symlink_script_host_path': '<(intermediate_dir)/create_symlinks.sh', | 
|   165     'symlink_script_device_path': '<(device_intermediate_dir)/create_symlinks.sh
      ', |   164     'symlink_script_device_path': '<(device_intermediate_dir)/create_symlinks.sh
      ', | 
|   166     'create_standalone_apk%': 1, |   165     'create_standalone_apk%': 1, | 
|   167     'res_v14_skip%': 0, |   166     'res_v14_skip%': 0, | 
|   168     'variables': { |   167     'variables': { | 
|   169       'variables': { |   168       'variables': { | 
|   170         'native_lib_target%': '', |   169         'native_lib_target%': '', | 
|   171         'native_lib_version_name%': '', |   170         'native_lib_version_name%': '', | 
|   172         'use_chromium_linker%' : 0, |   171         'use_chromium_linker%' : 0, | 
|   173         'use_relocation_packer%' : 0, |   172         'use_relocation_packer%' : 0, | 
|   174         'enable_chromium_linker_tests%': 0, |   173         'enable_chromium_linker_tests%': 0, | 
|   175         'is_test_apk%': 0, |   174         'is_test_apk%': 0, | 
|   176         'unsigned_apk_path': '<(intermediate_dir)/<(apk_name)-unsigned.apk', |   175         'unsigned_apk_path': '<(intermediate_dir)/<(apk_name)-unsigned.apk', | 
|   177         'unsigned_abi_split_apk_path': '<(intermediate_dir)/<(apk_name)-abi-<(an
      droid_app_abi)-unsigned.apk', |   176         'unsigned_abi_split_apk_path': '<(intermediate_dir)/<(apk_name)-abi-<(an
      droid_app_abi)-unsigned.apk', | 
|   178         'create_abi_split%': 0, |   177         'create_abi_split%': 0, | 
|   179         'enable_multidex%': 0, |   178         'enable_multidex%': 0, | 
|   180       }, |   179       }, | 
|   181       'unsigned_apk_path': '<(unsigned_apk_path)', |   180       'unsigned_apk_path': '<(unsigned_apk_path)', | 
|   182       'unsigned_abi_split_apk_path': '<(unsigned_abi_split_apk_path)', |   181       'unsigned_abi_split_apk_path': '<(unsigned_abi_split_apk_path)', | 
|   183       'create_abi_split%': '<(create_abi_split)', |   182       'create_abi_split%': '<(create_abi_split)', | 
 |   183       'final_apk_path%': '<(PRODUCT_DIR)/apks/<(apk_name).apk', | 
|   184       'conditions': [ |   184       'conditions': [ | 
|   185         ['gyp_managed_install == 1 and native_lib_target != ""', { |   185         ['gyp_managed_install == 1 and native_lib_target != ""', { | 
|   186           'conditions': [ |   186           'conditions': [ | 
|   187             ['create_abi_split == 0', { |   187             ['create_abi_split == 0', { | 
|   188               'unsigned_standalone_apk_path': '<(intermediate_dir)/<(apk_name)-s
      tandalone-unsigned.apk', |   188               'unsigned_standalone_apk_path': '<(intermediate_dir)/<(apk_name)-s
      tandalone-unsigned.apk', | 
|   189             }, { |   189             }, { | 
|   190               'unsigned_standalone_apk_path': '<(intermediate_dir)/<(apk_name)-a
      bi-<(android_app_abi)-standalone-unsigned.apk', |   190               'unsigned_standalone_apk_path': '<(intermediate_dir)/<(apk_name)-a
      bi-<(android_app_abi)-standalone-unsigned.apk', | 
|   191             }], |   191             }], | 
|   192           ], |   192           ], | 
|   193         }, { |   193         }, { | 
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|   236     'native_lib_placeholders': [], |   236     'native_lib_placeholders': [], | 
|   237     'main_apk_name': '<(apk_name)', |   237     'main_apk_name': '<(apk_name)', | 
|   238     'dex_path': '<(dex_path)', |   238     'dex_path': '<(dex_path)', | 
|   239     'conditions': [ |   239     'conditions': [ | 
|   240       ['chromium_code == 0', { |   240       ['chromium_code == 0', { | 
|   241         'enable_errorprone': 0, |   241         'enable_errorprone': 0, | 
|   242       }], |   242       }], | 
|   243     ], |   243     ], | 
|   244     'enable_errorprone%': 0, |   244     'enable_errorprone%': 0, | 
|   245     'errorprone_exe_path': '<(PRODUCT_DIR)/bin.java/chromium_errorprone', |   245     'errorprone_exe_path': '<(PRODUCT_DIR)/bin.java/chromium_errorprone', | 
 |   246     'final_apk_path%': '<(final_apk_path)', | 
|   246   }, |   247   }, | 
|   247   # Pass the jar path to the apk's "fake" jar target.  This would be better as |   248   # Pass the jar path to the apk's "fake" jar target.  This would be better as | 
|   248   # direct_dependent_settings, but a variable set by a direct_dependent_settings |   249   # direct_dependent_settings, but a variable set by a direct_dependent_settings | 
|   249   # cannot be lifted in a dependent to all_dependent_settings. |   250   # cannot be lifted in a dependent to all_dependent_settings. | 
|   250   'all_dependent_settings': { |   251   'all_dependent_settings': { | 
|   251     'conditions': [ |   252     'conditions': [ | 
|   252       ['proguard_enabled == "true"', { |   253       ['proguard_enabled == "true"', { | 
|   253         'variables': { |   254         'variables': { | 
|   254           'proguard_enabled': 'true', |   255           'proguard_enabled': 'true', | 
|   255         } |   256         } | 
|   256       }], |   257       }], | 
|   257       ['debug_build_proguard_enabled == "true"', { |   258       ['debug_build_proguard_enabled == "true"', { | 
|   258         'variables': { |   259         'variables': { | 
|   259           'debug_build_proguard_enabled': 'true', |   260           'debug_build_proguard_enabled': 'true', | 
|   260         } |   261         } | 
|   261       }], |   262       }], | 
 |   263       ['is_test_apk == 0', { | 
 |   264         'variables': { | 
 |   265           'tested_apk_path': '<(final_apk_path)', | 
 |   266           'tested_apk_obfuscated_jar_path': '<(obfuscated_jar_path)', | 
 |   267           'tested_apk_dex_path': '<(dex_path)', | 
 |   268           'tested_apk_is_multidex': '<(enable_multidex)', | 
 |   269         } | 
 |   270       }] | 
|   262     ], |   271     ], | 
|   263     'variables': { |   272     'variables': { | 
|   264       'apk_output_jar_path': '<(jar_path)', |   273       'apk_output_jar_path': '<(jar_path)', | 
|   265       'tested_apk_obfuscated_jar_path': '<(obfuscated_jar_path)', |  | 
|   266       'tested_apk_dex_path': '<(dex_path)', |  | 
|   267       'tested_apk_is_multidex': '<(enable_multidex)', |  | 
|   268     }, |   274     }, | 
|   269   }, |   275   }, | 
|   270   'conditions': [ |   276   'conditions': [ | 
|   271     ['resource_dir!=""', { |   277     ['resource_dir!=""', { | 
|   272       'variables': { |   278       'variables': { | 
|   273         'resource_input_paths': [ '<!@(find <(resource_dir) -name "*")' ] |   279         'resource_input_paths': [ '<!@(find <(resource_dir) -name "*")' ] | 
|   274       }, |   280       }, | 
|   275     }], |   281     }], | 
|   276     ['R_package != ""', { |   282     ['R_package != ""', { | 
|   277       'variables': { |   283       'variables': { | 
| (...skipping 921 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  1199             'native_libs_dir': '<(apk_package_native_libs_dir)', |  1205             'native_libs_dir': '<(apk_package_native_libs_dir)', | 
|  1200           }, { |  1206           }, { | 
|  1201             'native_libs_dir': '<(DEPTH)/build/android/ant/empty/res', |  1207             'native_libs_dir': '<(DEPTH)/build/android/ant/empty/res', | 
|  1202           }], |  1208           }], | 
|  1203         ], |  1209         ], | 
|  1204       }, |  1210       }, | 
|  1205       'includes': ['android/apkbuilder_action.gypi'], |  1211       'includes': ['android/apkbuilder_action.gypi'], | 
|  1206     }, |  1212     }, | 
|  1207   ], |  1213   ], | 
|  1208 } |  1214 } | 
| OLD | NEW |