From d68fa65d76f11f8294cd2852e2b1c3c28fc2465a Mon Sep 17 00:00:00 2001 From: "kjellander@webrtc.org" Date: Sat, 28 Feb 2015 11:17:33 +0000 Subject: [PATCH] Improve cleaning for Android demo applications There are a bunch of directories that are not cleaned between builds since they're added to .gitignore. R=glaznev@webrtc.org Review URL: https://webrtc-codereview.appspot.com/40999004 Cr-Commit-Position: refs/heads/master@{#8542} git-svn-id: http://webrtc.googlecode.com/svn/trunk@8542 4adac7df-926f-26a2-2b94-8c16560cd09d --- talk/libjingle_examples.gyp | 21 ++++++++++++--------- webrtc/webrtc_examples.gyp | 4 ++-- 2 files changed, 14 insertions(+), 11 deletions(-) diff --git a/talk/libjingle_examples.gyp b/talk/libjingle_examples.gyp index 6b8fe1977..9144c6799 100755 --- a/talk/libjingle_examples.gyp +++ b/talk/libjingle_examples.gyp @@ -385,22 +385,23 @@ '<(PRODUCT_DIR)/AppRTCDemo-debug.apk', ], 'variables': { + 'apprtc_demo_root': 'examples/android', 'ant_log': '../../<(INTERMEDIATE_DIR)/ant.log', # ../.. to compensate for the cd examples/android below. }, 'action': [ 'bash', '-ec', - 'rm -fr <(_outputs) examples/android/{bin,libs} && ' + 'rm -fr <(_outputs) <(apprtc_demo_root)/{bin,libs,gen,obj} && ' 'mkdir -p <(INTERMEDIATE_DIR) && ' # Must happen _before_ the cd below - 'mkdir -p examples/android/libs/<(android_app_abi) && ' - 'cp <(PRODUCT_DIR)/libjingle_peerconnection.jar examples/android/libs/ &&' - 'cp examples/android/third_party/autobanh/autobanh.jar examples/android/libs/ &&' - '<(android_strip) -o examples/android/libs/<(android_app_abi)/libjingle_peerconnection_so.so <(PRODUCT_DIR)/lib/libjingle_peerconnection_so.so &&' - 'cd examples/android && ' + 'mkdir -p <(apprtc_demo_root)/libs/<(android_app_abi) && ' + 'cp <(PRODUCT_DIR)/libjingle_peerconnection.jar <(apprtc_demo_root)/libs/ &&' + 'cp <(apprtc_demo_root)/third_party/autobanh/autobanh.jar <(apprtc_demo_root)/libs/ &&' + '<(android_strip) -o <(apprtc_demo_root)/libs/<(android_app_abi)/libjingle_peerconnection_so.so <(PRODUCT_DIR)/lib/libjingle_peerconnection_so.so &&' + 'cd <(apprtc_demo_root) && ' '{ ANDROID_SDK_ROOT=<(android_sdk_root) ' 'ant debug > <(ant_log) 2>&1 || ' ' { cat <(ant_log) ; exit 1; } } && ' 'cd - > /dev/null && ' - 'cp examples/android/bin/AppRTCDemo-debug.apk <(_outputs)' + 'cp <(apprtc_demo_root)/bin/AppRTCDemo-debug.apk <(_outputs)' ], }, ], @@ -434,17 +435,19 @@ '<(PRODUCT_DIR)/AppRTCDemoTest-debug.apk', ], 'variables': { + 'android_webrtc_demo_test_root': 'examples/androidtests', 'ant_log': '../../<(INTERMEDIATE_DIR)/ant.log', # ../.. to compensate for the cd examples/androidtests below. }, 'action': [ 'bash', '-ec', + 'rm -fr <(_outputs) <(android_webrtc_demo_test_root)/{bin,libs,gen} && ' 'mkdir -p <(INTERMEDIATE_DIR) && ' # Must happen _before_ the cd below - 'cd examples/androidtests && ' + 'cd <(android_webrtc_demo_test_root) && ' '{ ANDROID_SDK_ROOT=<(android_sdk_root) ' 'ant debug > <(ant_log) 2>&1 || ' ' { cat <(ant_log) ; exit 1; } } && ' 'cd - > /dev/null && ' - 'cp examples/androidtests/bin/AppRTCDemoTest-debug.apk <(_outputs)' + 'cp <(android_webrtc_demo_test_root)/bin/AppRTCDemoTest-debug.apk <(_outputs)' ], }, ], diff --git a/webrtc/webrtc_examples.gyp b/webrtc/webrtc_examples.gyp index 69c83dccc..f34cdd600 100644 --- a/webrtc/webrtc_examples.gyp +++ b/webrtc/webrtc_examples.gyp @@ -75,7 +75,7 @@ 'outputs': ['<(PRODUCT_DIR)/WebRTCDemo-debug.apk'], 'action': [ 'bash', '-ec', - 'rm -fr <(_outputs) <(android_webrtc_demo_root)/{bin,libs} && ' + 'rm -fr <(_outputs) <(android_webrtc_demo_root)/{bin,libs,gen,obj} && ' 'mkdir -p <(INTERMEDIATE_DIR) && ' # Must happen _before_ the cd below 'mkdir -p <(android_webrtc_demo_root)/libs/<(android_app_abi) && ' 'cp <(PRODUCT_DIR)/lib.java/audio_device_module_java.jar <(android_webrtc_demo_root)/libs/ &&' @@ -139,7 +139,7 @@ 'outputs': ['<(PRODUCT_DIR)/OpenSlDemo-debug.apk'], 'action': [ 'bash', '-ec', - 'rm -fr <(_outputs) <(android_opensl_demo_root)/{bin,libs} && ' + 'rm -fr <(_outputs) <(android_opensl_demo_root)/{bin,libs,gen,obj} && ' 'mkdir -p <(android_opensl_demo_root)/libs/<(android_app_abi) && ' 'mkdir -p <(INTERMEDIATE_DIR) && ' # Must happen _before_ the cd below '<(android_strip) -o <(android_opensl_demo_root)/libs/<(android_app_abi)/libopensl-demo-jni.so <(PRODUCT_DIR)/libopensl-demo-jni.so && '