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 = 27 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:java_audio_device_module_java", 30 "//sdk/android:video_java", 31 "//third_party/android_deps:androidx_core_core_java", 32 "//third_party/android_deps:androidx_legacy_legacy_support_v4_java", 33 ] 34 35 shared_libraries = [ ":examples_androidvoip_jni" ] 36 } 37 38 generate_jni("generated_jni") { 39 testonly = true 40 sources = [ "java/org/webrtc/examples/androidvoip/VoipClient.java" ] 41 namespace = "webrtc_examples" 42 jni_generator_include = "//sdk/android/src/jni/jni_generator_helper.h" 43 } 44 45 rtc_shared_library("examples_androidvoip_jni") { 46 testonly = true 47 sources = [ 48 "jni/android_voip_client.cc", 49 "jni/android_voip_client.h", 50 "jni/onload.cc", 51 ] 52 53 suppressed_configs += [ "//build/config/android:hide_all_but_jni_onload" ] 54 configs += [ "//build/config/android:hide_all_but_jni" ] 55 56 deps = [ 57 ":generated_jni", 58 "//api:transport_api", 59 "//api/audio_codecs:audio_codecs_api", 60 "//api/audio_codecs:builtin_audio_decoder_factory", 61 "//api/audio_codecs:builtin_audio_encoder_factory", 62 "//api/task_queue:default_task_queue_factory", 63 "//api/voip:voip_api", 64 "//api/voip:voip_engine_factory", 65 "//modules/utility:utility", 66 "//rtc_base", 67 "//rtc_base/third_party/sigslot:sigslot", 68 "//sdk/android:native_api_audio_device_module", 69 "//sdk/android:native_api_base", 70 "//sdk/android:native_api_jni", 71 "//third_party/abseil-cpp/absl/memory:memory", 72 ] 73 } 74 75 android_resources("resources") { 76 testonly = true 77 custom_package = "org.webrtc.examples.androidvoip" 78 sources = [ 79 "res/layout/activity_main.xml", 80 "res/values/colors.xml", 81 "res/values/strings.xml", 82 ] 83 84 # Needed for Bazel converter. 85 resource_dirs = [ "res" ] 86 assert(resource_dirs != []) # Mark as used. 87 } 88} 89