1import("//webrtc.gni") 2 3if (is_android) { 4 rtc_android_apk("androidnativeapi") { 5 testonly = true 6 apk_name = "androidnativeapi" 7 android_manifest = "AndroidManifest.xml" 8 min_sdk_version = 21 9 target_sdk_version = 27 10 11 sources = [ 12 "java/org/webrtc/examples/androidnativeapi/CallClient.java", 13 "java/org/webrtc/examples/androidnativeapi/MainActivity.java", 14 ] 15 16 deps = [ 17 ":resources", 18 "//modules/audio_device:audio_device_java", 19 "//rtc_base:base_java", 20 "//sdk/android:camera_java", 21 "//sdk/android:surfaceviewrenderer_java", 22 "//sdk/android:video_api_java", 23 "//sdk/android:video_java", 24 "//third_party/android_deps:com_android_support_support_annotations_java", 25 ] 26 27 shared_libraries = [ ":examples_androidnativeapi_jni" ] 28 } 29 30 generate_jni("generated_jni") { 31 testonly = true 32 sources = [ "java/org/webrtc/examples/androidnativeapi/CallClient.java" ] 33 namespace = "webrtc_examples" 34 jni_generator_include = "//sdk/android/src/jni/jni_generator_helper.h" 35 } 36 37 rtc_shared_library("examples_androidnativeapi_jni") { 38 testonly = true 39 sources = [ 40 "jni/android_call_client.cc", 41 "jni/android_call_client.h", 42 "jni/onload.cc", 43 ] 44 45 suppressed_configs += [ "//build/config/android:hide_all_but_jni_onload" ] 46 configs += [ "//build/config/android:hide_all_but_jni" ] 47 48 deps = [ 49 ":generated_jni", 50 "../../api:scoped_refptr", 51 "../../rtc_base/synchronization:mutex", 52 "//api:libjingle_peerconnection_api", 53 "//api/rtc_event_log:rtc_event_log_factory", 54 "//api/task_queue:default_task_queue_factory", 55 "//media:rtc_audio_video", 56 "//media:rtc_internal_video_codecs", 57 "//media:rtc_media_engine_defaults", 58 "//modules/utility", 59 "//pc:libjingle_peerconnection", 60 "//rtc_base", 61 "//rtc_base:rtc_base_approved", 62 "//sdk/android:native_api_base", 63 "//sdk/android:native_api_jni", 64 "//sdk/android:native_api_video", 65 ] 66 } 67 68 android_resources("resources") { 69 testonly = true 70 custom_package = "org.webrtc.examples.androidnativeapi" 71 sources = [ 72 "res/layout/activity_main.xml", 73 "res/values/strings.xml", 74 ] 75 76 # Needed for Bazel converter. 77 resource_dirs = [ "res" ] 78 assert(resource_dirs != []) # Mark as used. 79 } 80} 81