Convert AppRTCDemo and AppRTCDemoTest to proper GYP target.
Initial CL for converting AppRTCDemo and AppRTCDemoTest to the Chromium style of APK targets. This would make it possible to get rid of all the ugly bash stuff we currently have. CL will bump minimum SDK to v14, but this is the requirement to use Chrome tools. Initial work was done by kjellander@ https://webrtc-codereview.appspot.com/44549005/ R=kjellander@webrtc.org Review URL: https://webrtc-codereview.appspot.com/43679004 Cr-Commit-Position: refs/heads/master@{#8686} git-svn-id: http://webrtc.googlecode.com/svn/trunk@8686 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
parent
f1182dd2e4
commit
ae1a078ac4
@ -7,7 +7,7 @@
|
||||
<uses-feature android:name="android.hardware.camera" />
|
||||
<uses-feature android:name="android.hardware.camera.autofocus" />
|
||||
<uses-feature android:glEsVersion="0x00020000" android:required="true" />
|
||||
<uses-sdk android:minSdkVersion="13" android:targetSdkVersion="21" />
|
||||
<uses-sdk android:minSdkVersion="14" android:targetSdkVersion="21" />
|
||||
|
||||
<uses-permission android:name="android.permission.CAMERA" />
|
||||
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
|
||||
|
@ -16,21 +16,21 @@
|
||||
android:id="@+id/add_room_button"
|
||||
android:background="@android:drawable/ic_menu_add"
|
||||
android:contentDescription="@string/add_room_description"
|
||||
android:layout_marginRight="20dp"
|
||||
android:layout_marginEnd="20dp"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"/>
|
||||
<ImageButton
|
||||
android:id="@+id/remove_room_button"
|
||||
android:background="@android:drawable/ic_delete"
|
||||
android:contentDescription="@string/remove_room_description"
|
||||
android:layout_marginRight="20dp"
|
||||
android:layout_marginEnd="20dp"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"/>
|
||||
<ImageButton
|
||||
android:id="@+id/connect_button"
|
||||
android:background="@android:drawable/sym_action_call"
|
||||
android:contentDescription="@string/connect_description"
|
||||
android:layout_marginRight="20dp"
|
||||
android:layout_marginEnd="20dp"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"/>
|
||||
<ImageButton
|
||||
|
@ -11,7 +11,7 @@
|
||||
android:id="@+id/encoder_stat_call"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_alignParentRight="true"
|
||||
android:layout_alignParentEnd="true"
|
||||
android:textStyle="bold"
|
||||
android:textColor="#C000FF00"
|
||||
android:textSize="12dp"
|
||||
@ -39,7 +39,7 @@
|
||||
android:background="@android:drawable/ic_menu_info_details"
|
||||
android:contentDescription="@string/toggle_debug"
|
||||
android:layout_alignParentBottom="true"
|
||||
android:layout_alignParentLeft="true"
|
||||
android:layout_alignParentStart="true"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"/>
|
||||
|
||||
@ -56,7 +56,7 @@
|
||||
android:id="@+id/button_call_disconnect"
|
||||
android:background="@drawable/disconnect"
|
||||
android:contentDescription="@string/disconnect_call"
|
||||
android:layout_marginRight="16dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"/>
|
||||
|
||||
@ -64,7 +64,7 @@
|
||||
android:id="@+id/button_call_switch_camera"
|
||||
android:background="@android:drawable/ic_menu_camera"
|
||||
android:contentDescription="@string/switch_camera"
|
||||
android:layout_marginRight="8dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"/>
|
||||
|
||||
|
@ -331,7 +331,7 @@ public class PeerConnectionClientTest extends InstrumentationTestCase
|
||||
Log.d(TAG, "testSizeIsSetBeforeStartingToRender Done.");
|
||||
}
|
||||
|
||||
public void testLoopback(boolean enableVideo, String videoCodec)
|
||||
private void testLoopback(boolean enableVideo, String videoCodec)
|
||||
throws InterruptedException {
|
||||
loopback = true;
|
||||
MockRenderer localRenderer = null;
|
||||
|
@ -317,94 +317,22 @@
|
||||
{
|
||||
'target_name': 'AppRTCDemo',
|
||||
'type': 'none',
|
||||
'variables': {
|
||||
'apk_name': 'AppRTCDemo',
|
||||
'java_in_dir': 'examples/android',
|
||||
'resource_dir': 'examples/android/res',
|
||||
'input_jars_paths': [
|
||||
'examples/android/third_party/autobanh/autobanh.jar',
|
||||
],
|
||||
'library_dexed_jars_paths': [
|
||||
'examples/android/third_party/autobanh/autobanh.jar',
|
||||
],
|
||||
'native_lib_target': 'libjingle_peerconnection_so',
|
||||
},
|
||||
'dependencies': [
|
||||
'libjingle.gyp:libjingle_peerconnection_jar',
|
||||
],
|
||||
'actions': [
|
||||
{
|
||||
# TODO(glaznev): convert from a custom script to a standard gyp
|
||||
# apk build once chromium's apk-building gyp machinery can be used
|
||||
# (http://crbug.com/225101)
|
||||
'action_name': 'build_apprtcdemo_apk',
|
||||
'inputs' : [
|
||||
'<(PRODUCT_DIR)/libjingle_peerconnection.jar',
|
||||
'<(PRODUCT_DIR)/lib/libjingle_peerconnection_so.so',
|
||||
'examples/android/AndroidManifest.xml',
|
||||
'examples/android/README',
|
||||
'examples/android/ant.properties',
|
||||
'examples/android/third_party/autobanh/autobanh.jar',
|
||||
'examples/android/build.xml',
|
||||
'examples/android/jni/Android.mk',
|
||||
'examples/android/project.properties',
|
||||
'examples/android/res/drawable-hdpi/disconnect.png',
|
||||
'examples/android/res/drawable-hdpi/ic_action_full_screen.png',
|
||||
'examples/android/res/drawable-hdpi/ic_action_return_from_full_screen.png',
|
||||
'examples/android/res/drawable-hdpi/ic_loopback_call.png',
|
||||
'examples/android/res/drawable-hdpi/ic_launcher.png',
|
||||
'examples/android/res/drawable-ldpi/disconnect.png',
|
||||
'examples/android/res/drawable-ldpi/ic_action_full_screen.png',
|
||||
'examples/android/res/drawable-ldpi/ic_action_return_from_full_screen.png',
|
||||
'examples/android/res/drawable-ldpi/ic_loopback_call.png',
|
||||
'examples/android/res/drawable-ldpi/ic_launcher.png',
|
||||
'examples/android/res/drawable-mdpi/disconnect.png',
|
||||
'examples/android/res/drawable-mdpi/ic_action_full_screen.png',
|
||||
'examples/android/res/drawable-mdpi/ic_action_return_from_full_screen.png',
|
||||
'examples/android/res/drawable-mdpi/ic_loopback_call.png',
|
||||
'examples/android/res/drawable-mdpi/ic_launcher.png',
|
||||
'examples/android/res/drawable-xhdpi/disconnect.png',
|
||||
'examples/android/res/drawable-xhdpi/ic_action_full_screen.png',
|
||||
'examples/android/res/drawable-xhdpi/ic_action_return_from_full_screen.png',
|
||||
'examples/android/res/drawable-xhdpi/ic_loopback_call.png',
|
||||
'examples/android/res/drawable-xhdpi/ic_launcher.png',
|
||||
'examples/android/res/layout/activity_call.xml',
|
||||
'examples/android/res/layout/activity_connect.xml',
|
||||
'examples/android/res/layout/fragment_call.xml',
|
||||
'examples/android/res/menu/connect_menu.xml',
|
||||
'examples/android/res/values/arrays.xml',
|
||||
'examples/android/res/values/strings.xml',
|
||||
'examples/android/res/xml/preferences.xml',
|
||||
'examples/android/src/org/appspot/apprtc/AppRTCAudioManager.java',
|
||||
'examples/android/src/org/appspot/apprtc/AppRTCClient.java',
|
||||
'examples/android/src/org/appspot/apprtc/AppRTCProximitySensor.java',
|
||||
'examples/android/src/org/appspot/apprtc/CallActivity.java',
|
||||
'examples/android/src/org/appspot/apprtc/CallFragment.java',
|
||||
'examples/android/src/org/appspot/apprtc/ConnectActivity.java',
|
||||
'examples/android/src/org/appspot/apprtc/CpuMonitor.java',
|
||||
'examples/android/src/org/appspot/apprtc/PeerConnectionClient.java',
|
||||
'examples/android/src/org/appspot/apprtc/RoomParametersFetcher.java',
|
||||
'examples/android/src/org/appspot/apprtc/SettingsActivity.java',
|
||||
'examples/android/src/org/appspot/apprtc/SettingsFragment.java',
|
||||
'examples/android/src/org/appspot/apprtc/UnhandledExceptionHandler.java',
|
||||
'examples/android/src/org/appspot/apprtc/WebSocketChannelClient.java',
|
||||
'examples/android/src/org/appspot/apprtc/WebSocketRTCClient.java',
|
||||
'examples/android/src/org/appspot/apprtc/util/AppRTCUtils.java',
|
||||
'examples/android/src/org/appspot/apprtc/util/AsyncHttpURLConnection.java',
|
||||
'examples/android/src/org/appspot/apprtc/util/LooperExecutor.java',
|
||||
],
|
||||
'outputs': [
|
||||
'<(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) <(apprtc_demo_root)/{bin,libs,gen,obj} && '
|
||||
'mkdir -p <(INTERMEDIATE_DIR) && ' # Must happen _before_ the cd below
|
||||
'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 <(apprtc_demo_root)/bin/AppRTCDemo-debug.apk <(_outputs)'
|
||||
],
|
||||
},
|
||||
'libjingle.gyp:libjingle_peerconnection_java',
|
||||
],
|
||||
'includes': [ '../build/java_apk.gypi' ],
|
||||
}, # target AppRTCDemo
|
||||
], # targets
|
||||
}], # OS=="android"
|
||||
@ -417,41 +345,19 @@
|
||||
'dependencies': [
|
||||
'AppRTCDemo',
|
||||
],
|
||||
'actions': [
|
||||
{
|
||||
# TODO(glaznev): convert from a custom script to a standard gyp
|
||||
# apk build once chromium's apk-building gyp machinery can be used
|
||||
# (http://crbug.com/225101)
|
||||
'action_name': 'build_apprtcdemotest_apk',
|
||||
'inputs' : [
|
||||
'examples/androidtests/AndroidManifest.xml',
|
||||
'examples/androidtests/ant.properties',
|
||||
'examples/androidtests/build.xml',
|
||||
'examples/androidtests/project.properties',
|
||||
'examples/androidtests/src/org/appspot/apprtc/test/LooperExecutorTest.java',
|
||||
'examples/androidtests/src/org/appspot/apprtc/test/PeerConnectionClientTest.java',
|
||||
],
|
||||
'outputs': [
|
||||
'<(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 <(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 <(android_webrtc_demo_test_root)/bin/AppRTCDemoTest-debug.apk <(_outputs)'
|
||||
],
|
||||
},
|
||||
],
|
||||
}, # target AppRTCDemoTest
|
||||
'variables': {
|
||||
'apk_name': 'AppRTCDemoTest',
|
||||
'java_in_dir': 'examples/androidtests',
|
||||
'additional_src_dirs': [
|
||||
'examples/android',
|
||||
],
|
||||
'input_jars_paths': [
|
||||
'examples/android/third_party/autobanh/autobanh.jar',
|
||||
],
|
||||
'is_test_apk': 1,
|
||||
},
|
||||
'includes': [ '../build/java_apk.gypi' ],
|
||||
},
|
||||
], # targets
|
||||
}], # OS=="android"
|
||||
],
|
||||
|
Loading…
x
Reference in New Issue
Block a user