diff options
author | dfalcantara@chromium.org <dfalcantara@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-06-20 21:42:06 +0000 |
---|---|---|
committer | dfalcantara@chromium.org <dfalcantara@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-06-20 21:42:06 +0000 |
commit | d67b1ce8691f3a829d090f401d22485b8c99adfc (patch) | |
tree | b4daadb6ccf52db0357e6264a596a0a8dee6bc19 /build/java_apk.gypi | |
parent | 44c4b354a12e74b4af35be64853745ec9afe0d33 (diff) | |
download | chromium_src-d67b1ce8691f3a829d090f401d22485b8c99adfc.zip chromium_src-d67b1ce8691f3a829d090f401d22485b8c99adfc.tar.gz chromium_src-d67b1ce8691f3a829d090f401d22485b8c99adfc.tar.bz2 |
Revert "[Android] Support building standalone APK in component build"
This breaks the Android component build.
This reverts commit 125e64a9eb6406446fb864aea9fa887521f19616.
>> [Android] Support building standalone APK in component build
>>
>> Many people's workflows assume that they can install the APK created in
>> out/Debug/apks. With the component build that APK is actually an
>> "incomplete" APK that cannot be manually installed (or rather causes
>> obscure errors when manually installed).
>>
>> This change does two things. First, it moves the "incomplete" APK
>> output to out/Debug/<package_name>/<ApkName>.apk. This should prevent
>> accidental installs of the "incomplete" APK. Second, it introduces an
>> option (create_standalone_apk) that when doing a component build, if
>> set, will merge the shared libraries into the "incomplete" APK to
>> create a standalone APK. This standalone APK will be created in
>> out/Debug/apks/.
>>
>> Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=207345
>>
>> Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=207516
BUG=
R=cjhopman@chromium.org
Review URL: https://codereview.chromium.org/17291013
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@207587 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'build/java_apk.gypi')
-rw-r--r-- | build/java_apk.gypi | 76 |
1 files changed, 27 insertions, 49 deletions
diff --git a/build/java_apk.gypi b/build/java_apk.gypi index db0ae81..8c794f0 100644 --- a/build/java_apk.gypi +++ b/build/java_apk.gypi @@ -102,28 +102,24 @@ 'link_stamp': '<(intermediate_dir)/link.stamp', 'package_resources_stamp': '<(intermediate_dir)/package_resources.stamp', 'codegen_input_paths': [], + 'keystore_path': '<(DEPTH)/build/android/ant/chromium-debug.keystore', 'unsigned_apk_path': '<(intermediate_dir)/<(apk_name)-unsigned.apk', 'final_apk_path%': '<(PRODUCT_DIR)/apks/<(apk_name).apk', - 'incomplete_apk_path': '<(intermediate_dir)/<(apk_name)-incomplete.apk', 'source_dir': '<(java_in_dir)/src', 'apk_install_record': '<(intermediate_dir)/apk_install.record.stamp', 'device_intermediate_dir': '/data/local/tmp/chromium/<(_target_name)/<(CONFIGURATION_NAME)', 'symlink_script_host_path': '<(intermediate_dir)/create_symlinks.sh', 'symlink_script_device_path': '<(device_intermediate_dir)/create_symlinks.sh', - 'create_standalone_apk%': 1, 'variables': { 'conditions': [ ['gyp_managed_install == 1', { 'apk_package_native_libs_dir': '<(intermediate_dir)/libs.managed', - 'unsigned_standalone_apk_path': '<(intermediate_dir)/<(apk_name)-standalone-unsigned.apk', }, { 'apk_package_native_libs_dir': '<(intermediate_dir)/libs', - 'unsigned_standalone_apk_path': '<(unsigned_apk_path)', }], ], }, 'apk_package_native_libs_dir': '<(apk_package_native_libs_dir)', - 'unsigned_standalone_apk_path': '<(unsigned_standalone_apk_path)', }, # Pass the jar path to the apk's "fake" jar target. This would be better as # direct_dependent_settings, but a variable set by a direct_dependent_settings @@ -234,8 +230,7 @@ 'conditions': [ ['gyp_managed_install == 1', { 'variables': { - 'libraries_top_dir': '<(intermediate_dir)/lib.stripped', - 'libraries_source_dir': '<(libraries_top_dir)/lib/<(android_app_abi)', + 'libraries_source_dir': '<(intermediate_dir)/lib.stripped/<(android_app_abi)', 'device_library_dir': '<(device_intermediate_dir)/lib.stripped', }, 'dependencies': [ @@ -263,30 +258,11 @@ '--script-host-path=<(symlink_script_host_path)', '--script-device-path=<(symlink_script_device_path)', '--target-dir=<(device_library_dir)', - '--apk=<(incomplete_apk_path)', + '--apk=<(final_apk_path)', '--stamp=<(link_stamp)', ], }, ], - 'conditions': [ - ['create_standalone_apk == 1', { - 'actions': [ - { - 'action_name': 'create standalone APK', - 'variables': { - 'inputs': [ - '<(ordered_libraries_file)', - '<(strip_stamp)', - ], - 'input_apk_path': '<(unsigned_apk_path)', - 'output_apk_path': '<(unsigned_standalone_apk_path)', - 'libraries_top_dir%': '<(libraries_top_dir)', - }, - 'includes': [ 'android/create_standalone_apk_action.gypi' ], - }, - ], - }], - ], }, { # gyp_managed_install != 1 'variables': { @@ -296,18 +272,6 @@ }], ], }], # native_lib_target != '' - ['gyp_managed_install == 0 or create_standalone_apk == 1', { - 'actions': [ - { - 'action_name': 'finalize standalone apk', - 'variables': { - 'input_apk_path': '<(unsigned_standalone_apk_path)', - 'output_apk_path': '<(final_apk_path)', - }, - 'includes': [ 'android/finalize_apk_action.gypi'] - }, - ], - }], ['java_strings_grd != ""', { 'variables': { 'res_grit_dir': '<(SHARED_INTERMEDIATE_DIR)/<(package_name)_apk/res_grit', @@ -334,20 +298,12 @@ ['gyp_managed_install == 1', { 'actions': [ { - 'action_name': 'finalize incomplete apk', - 'variables': { - 'input_apk_path': '<(unsigned_apk_path)', - 'output_apk_path': '<(incomplete_apk_path)', - }, - 'includes': [ 'android/finalize_apk_action.gypi'] - }, - { 'action_name': 'apk_install_<(_target_name)', 'message': 'Installing <(apk_name).apk', 'inputs': [ '<(DEPTH)/build/android/gyp/util/build_utils.py', '<(DEPTH)/build/android/gyp/apk_install.py', - '<(incomplete_apk_path)', + '<(final_apk_path)', ], 'outputs': [ '<(apk_install_record)', @@ -360,7 +316,7 @@ 'action': [ 'python', '<(DEPTH)/build/android/gyp/apk_install.py', '--android-sdk-tools=<(android_sdk_tools)', - '--apk-path=<(incomplete_apk_path)', + '--apk-path=<(final_apk_path)', '--install-record=<(apk_install_record)' ], }, @@ -627,5 +583,27 @@ '-DTHIS_IS_IGNORED=>!(echo \'>(_inputs)\' | md5sum)', ] }, + { + 'action_name': 'finalize_apk', + 'message': 'Signing/aligning <(_target_name) APK.', + 'inputs': [ + '<(DEPTH)/build/android/gyp/util/build_utils.py', + '<(DEPTH)/build/android/gyp/finalize_apk.py', + '<(unsigned_apk_path)', + ], + 'outputs': [ + '<(final_apk_path)', + ], + 'action': [ + 'python', '<(DEPTH)/build/android/gyp/finalize_apk.py', + '--android-sdk-root=<(android_sdk_root)', + '--unsigned-apk-path=<(unsigned_apk_path)', + '--final-apk-path=<(final_apk_path)', + '--keystore-path=<(keystore_path)', + + # TODO(newt): remove this once crbug.com/177552 is fixed in ninja. + '--ignore=>!(echo \'>(_inputs)\' | md5sum)', + ], + }, ], } |