Index: build/java_apk.gypi |
diff --git a/build/java_apk.gypi b/build/java_apk.gypi |
index f9387cd2d6675bc98c5bfeddda2d52a99e1a205b..7aeb715296ca40dc3efcdab729a3ac887c6aa94b 100644 |
--- a/build/java_apk.gypi |
+++ b/build/java_apk.gypi |
@@ -85,6 +85,7 @@ |
'native_libraries_template_data_dir': '<(intermediate_dir)/native_libraries/', |
'native_libraries_template_data_file': '<(native_libraries_template_data_dir)/native_libraries_array.h', |
'native_libraries_template_version_file': '<(native_libraries_template_data_dir)/native_libraries_version.h', |
+ 'native_libraries_cleanup_stamp': '<(intermediate_dir)/native_libraries_cleanup.stamp', |
'compile_stamp': '<(intermediate_dir)/compile.stamp', |
'lint_stamp': '<(intermediate_dir)/lint.stamp', |
'lint_result': '<(intermediate_dir)/lint_result.xml', |
@@ -183,6 +184,32 @@ |
'<(DEPTH)/base/base.gyp:chromium_android_linker', |
], |
}], |
+ ['native_lib_target != "" and component != "shared_library" and use_chromium_linker != 1', { |
cjhopman
2014/03/17 18:32:35
I think this would be better if it just explicitly
Feng Qian
2014/03/18 00:07:01
Listing libraries to keep will have issues with bu
cjhopman
2014/03/18 00:16:55
Oh right, because this is deleting the ones in <(S
|
+ # cleanup old libraries in PRODUCT_DIR and package lib directories |
+ 'variables': { |
+ 'package_input_paths': [ '<(native_libraries_cleanup_stamp)' ], |
+ }, |
+ 'actions': [ |
+ { |
+ 'action_name': 'cleanup_old_libraries', |
+ 'inputs': [ |
+ '<(DEPTH)/chrome/VERSION', |
+ '<(DEPTH)/build/android/gyp/delete_files.py', |
+ ], |
+ 'outputs': [ |
+ '<(native_libraries_cleanup_stamp)', |
+ ], |
+ 'action': [ |
+ 'python', '<(DEPTH)/build/android/gyp/delete_files.py', |
+ '--stamp=<(native_libraries_cleanup_stamp)', |
+ '--pattern=<(native_lib_target).*.so*', |
+ '--keep=<(native_lib_target).>(android_product_extension)*', |
+ '<(SHARED_LIB_DIR)', |
+ '<(apk_package_native_libs_dir)/<(android_app_abi)', |
+ ], |
+ }, |
+ ], |
+ }], |
['native_lib_target != ""', { |
'variables': { |
'compile_input_paths': [ '<(native_libraries_java_stamp)' ], |