Android build: make it quiet on success and not overly noisy on failure.

- OpenSLDemo and WebRTCDemo get the sauce that AppRTCDemo got in r5271
- libjingle_peerconnection_jar is now silent on success
- Fix a bug introduced by r5271 which caused ant logs to be emitted to a subdir of talk/examples instead of in the gyp output directory.

R=andrew@webrtc.org

Review URL: https://webrtc-codereview.appspot.com/6199005

git-svn-id: http://webrtc.googlecode.com/svn/trunk@5332 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
fischman@webrtc.org 2013-12-20 22:49:35 +00:00
parent a63fc87139
commit 000dde99c8
4 changed files with 40 additions and 28 deletions

View File

@ -80,6 +80,7 @@
'variables': {
'java_src_dir': 'app/webrtc/java/src',
'webrtc_modules_dir': '<(webrtc_root)/modules',
'build_jar_log': '<(INTERMEDIATE_DIR)/build_jar.log',
'peerconnection_java_files': [
'app/webrtc/java/src/org/webrtc/AudioSource.java',
'app/webrtc/java/src/org/webrtc/AudioTrack.java',
@ -137,10 +138,13 @@
}],
],
'action': [
'build/build_jar.sh', '<(java_home)', '<@(_outputs)',
'<(INTERMEDIATE_DIR)',
'<(build_classpath)',
'<@(java_files)'
'bash', '-ec',
'mkdir -p <(INTERMEDIATE_DIR) && '
'{ build/build_jar.sh <(java_home) <@(_outputs) '
' <(INTERMEDIATE_DIR)/build_jar.tmp '
' <(build_classpath) <@(java_files) '
' > <(build_jar_log) 2>&1 || '
' { cat <(build_jar_log) ; exit 1; } }'
],
},
],

View File

@ -305,16 +305,16 @@
'<(PRODUCT_DIR)/AppRTCDemo-debug.apk',
],
'variables': {
'ant_log': '<(INTERMEDIATE_DIR)/ant.log',
'ant_log': '../../<(INTERMEDIATE_DIR)/ant.log', # ../.. to compensate for the cd examples/android below.
},
'action': [
'bash', '-ec',
'rm -fr <(_outputs) examples/android/{bin,libs} && '
'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/ &&'
'<(android_strip) -o examples/android/libs/<(android_app_abi)/libjingle_peerconnection_so.so <(PRODUCT_DIR)/libjingle_peerconnection_so.so &&'
'cd examples/android && '
'mkdir -p <(INTERMEDIATE_DIR) && '
'{ ant -q -l <(ant_log) debug || '
' { cat <(ant_log) ; exit 1; } } && '
'cd - > /dev/null && '

View File

@ -280,6 +280,7 @@
'action_name': 'build_opensldemo_apk',
'variables': {
'android_opensl_demo_root': '<(webrtc_root)/modules/audio_device/android/test',
'ant_log': '../../../<(INTERMEDIATE_DIR)/ant.log', # ../../.. to compensate for the cd below.
},
'inputs' : [
'<(PRODUCT_DIR)/lib.java/audio_device_module_java.jar',
@ -292,16 +293,19 @@
'<(android_opensl_demo_root)/project.properties',
],
'outputs': ['<(PRODUCT_DIR)/OpenSlDemo-debug.apk'],
'action': ['bash', '-ec',
'rm -f <(_outputs) && '
'mkdir -p <(android_opensl_demo_root)/libs/<(android_app_abi) && '
'<(android_strip) -o <(android_opensl_demo_root)/libs/<(android_app_abi)/libopensl-demo-jni.so <(PRODUCT_DIR)/libopensl-demo-jni.so && '
'cp <(PRODUCT_DIR)/lib.java/audio_device_module_java.jar <(android_opensl_demo_root)/libs/ &&'
'cd <(android_opensl_demo_root) && '
'ant debug && '
'cd - && '
'cp <(android_opensl_demo_root)/bin/OpenSlDemo-debug.apk <(_outputs)'
],
'action': [
'bash', '-ec',
'rm -f <(_outputs) && '
'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 && '
'cp <(PRODUCT_DIR)/lib.java/audio_device_module_java.jar <(android_opensl_demo_root)/libs/ &&'
'cd <(android_opensl_demo_root) && '
'{ ant -q -l <(ant_log) debug || '
' { cat <(ant_log) ; exit 1; } } && '
'cd - > /dev/null && '
'cp <(android_opensl_demo_root)/bin/OpenSlDemo-debug.apk <(_outputs)'
],
},
],
}],

View File

@ -51,6 +51,7 @@
'action_name': 'build_webrtcdemo_apk',
'variables': {
'android_webrtc_demo_root': '<(webrtc_root)/examples/android/media_demo',
'ant_log': '../../../<(INTERMEDIATE_DIR)/ant.log', # ../../.. to compensate for the cd below.
},
'inputs' : [
'<(PRODUCT_DIR)/lib.java/audio_device_module_java.jar',
@ -64,18 +65,21 @@
'<(android_webrtc_demo_root)/project.properties',
],
'outputs': ['<(PRODUCT_DIR)/WebRTCDemo-debug.apk'],
'action': ['bash', '-ec',
'rm -fr <(_outputs) <(android_webrtc_demo_root)/{bin,libs} && '
'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/ &&'
'cp <(PRODUCT_DIR)/lib.java/video_capture_module_java.jar <(android_webrtc_demo_root)/libs/ &&'
'cp <(PRODUCT_DIR)/lib.java/video_render_module_java.jar <(android_webrtc_demo_root)/libs/ &&'
'<(android_strip) -o <(android_webrtc_demo_root)/libs/<(android_app_abi)/libwebrtcdemo-jni.so <(PRODUCT_DIR)/libwebrtcdemo-jni.so && '
'cd <(android_webrtc_demo_root) && '
'ant debug && '
'cd - && '
'cp <(android_webrtc_demo_root)/bin/WebRTCDemo-debug.apk <(_outputs)'
],
'action': [
'bash', '-ec',
'rm -fr <(_outputs) <(android_webrtc_demo_root)/{bin,libs} && '
'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/ &&'
'cp <(PRODUCT_DIR)/lib.java/video_capture_module_java.jar <(android_webrtc_demo_root)/libs/ &&'
'cp <(PRODUCT_DIR)/lib.java/video_render_module_java.jar <(android_webrtc_demo_root)/libs/ &&'
'<(android_strip) -o <(android_webrtc_demo_root)/libs/<(android_app_abi)/libwebrtcdemo-jni.so <(PRODUCT_DIR)/libwebrtcdemo-jni.so && '
'cd <(android_webrtc_demo_root) && '
'{ ant -q -l <(ant_log) debug || '
' { cat <(ant_log) ; exit 1; } } && '
'cd - > /dev/null && '
'cp <(android_webrtc_demo_root)/bin/WebRTCDemo-debug.apk <(_outputs)'
],
},
],
},