1# Copyright (c) 2020 The WebRTC project authors. All Rights Reserved. 2# 3# Use of this source code is governed by a BSD-style license 4# that can be found in the LICENSE file in the root of the source 5# tree. An additional intellectual property rights grant can be found 6# in the file PATENTS. All contributing project authors may 7# be found in the AUTHORS file in the root of the source tree. 8 9import("//webrtc.gni") 10 11if (is_android) { 12 rtc_android_apk("androidvoip") { 13 testonly = true 14 apk_name = "androidvoip" 15 android_manifest = "AndroidManifest.xml" 16 min_sdk_version = 21 17 target_sdk_version = 31 18 19 sources = [ 20 "java/org/webrtc/examples/androidvoip/MainActivity.java", 21 "java/org/webrtc/examples/androidvoip/OnVoipClientTaskCompleted.java", 22 "java/org/webrtc/examples/androidvoip/VoipClient.java", 23 ] 24 25 deps = [ 26 ":resources", 27 "//modules/audio_device:audio_device_java", 28 "//rtc_base:base_java", 29 "//sdk/android:base_java", 30 "//sdk/android:java_audio_device_module_java", 31 "//sdk/android:video_java", 32 "//third_party/androidx:androidx_core_core_java", 33 "//third_party/androidx:androidx_legacy_legacy_support_v4_java", 34 ] 35 36 shared_libraries = [ ":examples_androidvoip_jni" ] 37 } 38 39 generate_jni("generated_jni") { 40 testonly = true 41 sources = [ "java/org/webrtc/examples/androidvoip/VoipClient.java" ] 42 namespace = "webrtc_examples" 43 jni_generator_include = "//sdk/android/src/jni/jni_generator_helper.h" 44 } 45 46 rtc_shared_library("examples_androidvoip_jni") { 47 testonly = true 48 sources = [ 49 "jni/android_voip_client.cc", 50 "jni/android_voip_client.h", 51 "jni/onload.cc", 52 ] 53 54 suppressed_configs += [ "//build/config/android:hide_all_but_jni_onload" ] 55 configs += [ "//build/config/android:hide_all_but_jni" ] 56 57 deps = [ 58 ":generated_jni", 59 "../../rtc_base:logging", 60 "../../rtc_base:socket_address", 61 "../../rtc_base:socket_server", 62 "../../rtc_base:threading", 63 "//api:transport_api", 64 "//api/audio_codecs:audio_codecs_api", 65 "//api/audio_codecs:builtin_audio_decoder_factory", 66 "//api/audio_codecs:builtin_audio_encoder_factory", 67 "//api/task_queue:default_task_queue_factory", 68 "//api/voip:voip_api", 69 "//api/voip:voip_engine_factory", 70 "//rtc_base", 71 "//rtc_base/third_party/sigslot:sigslot", 72 "//sdk/android:native_api_audio_device_module", 73 "//sdk/android:native_api_base", 74 "//sdk/android:native_api_jni", 75 "//third_party/abseil-cpp/absl/memory:memory", 76 ] 77 } 78 79 android_resources("resources") { 80 testonly = true 81 custom_package = "org.webrtc.examples.androidvoip" 82 sources = [ 83 "res/layout/activity_main.xml", 84 "res/values/colors.xml", 85 "res/values/strings.xml", 86 ] 87 88 # Needed for Bazel converter. 89 resource_dirs = [ "res" ] 90 assert(resource_dirs != []) # Mark as used. 91 } 92} 93