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

Unified Diff: build/java_apk.gypi

Issue 13334003: Push native libraries separately when gyp manages install (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@apkinstall
Patch Set: Created 7 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « build/android/pylib/build_utils.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/java_apk.gypi
diff --git a/build/java_apk.gypi b/build/java_apk.gypi
index f7951194d1ca3370168c4623f3ad53765328d9d7..3babd09f684e8db95feca85ba80707922932fc4f 100644
--- a/build/java_apk.gypi
+++ b/build/java_apk.gypi
@@ -73,8 +73,8 @@
'intermediate_dir': '<(PRODUCT_DIR)/<(_target_name)',
'asset_location%': '<(intermediate_dir)/assets',
'codegen_stamp': '<(intermediate_dir)/codegen.stamp',
- 'compile_input_paths': [ ],
- 'package_input_paths': [ ],
+ 'compile_input_paths': [],
+ 'package_input_paths': [],
'ordered_libraries_file': '<(intermediate_dir)/native_libraries.json',
# TODO(cjhopman): build/ shouldn't refer to content/. The libraryloader and
# nativelibraries template should be moved out of content/ (to base/?).
@@ -97,6 +97,8 @@
'obfuscated_jar_path': '<(intermediate_dir)/obfuscated.jar',
'dex_path': '<(intermediate_dir)/classes.dex',
'android_manifest': '<(java_in_dir)/AndroidManifest.xml',
+ 'push_stamp': '<(intermediate_dir)/push.stamp',
+ 'link_stamp': '<(intermediate_dir)/link.stamp',
'codegen_input_paths': [],
'final_apk_path': '<(PRODUCT_DIR)/apks/<(apk_name).apk',
'apk_install_stamp': '<(intermediate_dir)/apk_install.stamp',
@@ -128,7 +130,6 @@
'variables': {
'compile_input_paths': [ '<(native_libraries_java_stamp)' ],
'generated_src_dirs': [ '<(native_libraries_java_dir)' ],
- 'package_input_paths': [ '<(strip_stamp)' ],
},
'actions': [
{
@@ -189,9 +190,6 @@
{
'action_name': 'strip_native_libraries',
'message': 'Stripping libraries for <(_target_name)',
- 'variables': {
- 'apk_libraries_dir': '<(intermediate_dir)/libs/<(android_app_abi)',
- },
'inputs': [
'<(DEPTH)/build/android/pylib/build_utils.py',
'<(DEPTH)/build/android/strip_library_for_apk.py',
@@ -211,6 +209,62 @@
],
},
],
+ 'conditions': [
+ ['gyp_managed_install == 1', {
+ 'variables': {
+ 'apk_libraries_dir': '<(intermediate_dir)/lib.stripped/',
+ 'device_library_dir': '/data/local/tmp/chromium/lib.stripped/<(_target_name)',
+ },
+ 'dependencies': [
+ '<(DEPTH)/tools/android/md5sum/md5sum.gyp:md5sum',
+ ],
+ 'actions': [
+ {
+ 'action_name': 'push_libraries_<(_target_name)',
+ 'message': 'Pushing libraries to device for <(_target_name)',
+ 'inputs': [
+ '<(DEPTH)/build/android/pylib/build_utils.py',
+ '<(DEPTH)/build/android/gyp/push_libraries.py',
+ '<(strip_stamp)',
+ ],
+ 'outputs': [
+ '<(push_stamp)'
+ ],
+ 'action': [
+ 'python', '<(DEPTH)/build/android/gyp/push_libraries.py',
+ '--libraries-dir=<(apk_libraries_dir)',
+ '--device-dir=<(device_library_dir)',
+ '--libraries-json=<(ordered_libraries_file)',
+ '--stamp=<(push_stamp)',
+ ],
+ },
+ {
+ 'action_name': 'create_library_links',
+ 'message': 'Creating links on device for <(_target_name).',
+ 'inputs': [
+ '<(DEPTH)/build/android/gyp/create_device_library_links.py',
+ '<(apk_install_stamp)',
+ '<(push_stamp)'
+ ],
+ 'outputs': [
+ '<(link_stamp)'
+ ],
+ 'action': [
+ 'python', '<(DEPTH)/build/android/gyp/create_device_library_links.py',
+ '--apk=<(final_apk_path)',
+ '--libraries-json=<(ordered_libraries_file)',
+ '--target-dir=<(device_library_dir)',
+ '--stamp=<(link_stamp)',
+ ],
+ },
+ ],
+ }, {
+ 'variables': {
+ 'apk_libraries_dir': '<(intermediate_dir)/libs/<(android_app_abi)',
+ 'package_input_paths': [ '<(strip_stamp)' ],
+ },
+ }],
+ ],
}], # native_libs_paths != []
['java_strings_grd != ""', {
'variables': {
« no previous file with comments | « build/android/pylib/build_utils.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698