1# Copyright (c) 2024 Huawei Device Co., Ltd. 2# Licensed under the Apache License, Version 2.0 (the "License"); 3# you may not use this file except in compliance with the License. 4# You may obtain a copy of the License at 5# 6# http://www.apache.org/licenses/LICENSE-2.0 7# 8# Unless required by applicable law or agreed to in writing, software 9# distributed under the License is distributed on an "AS IS" BASIS, 10# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11# See the License for the specific language governing permissions and 12# limitations under the License. 13 14import("//build/ohos.gni") 15import("//build/config/components/idl_tool/idl.gni") 16 17idl_interface_sources = [ 18 "${target_gen_dir}/test_server_interface_proxy.cpp", 19 "${target_gen_dir}/test_server_interface_stub.cpp", 20] 21 22idl_gen_interface("test_server_interface") { 23 src_idl = rebase_path("ITestServerInterface.idl") 24 sources_common = [ 25 "Types.idl", 26 ] 27 dst_file = string_join(",", idl_interface_sources) 28 log_domainid = "0xD003110" 29 log_tag = "TestServerIPC" 30} 31 32config("test_server_service_config") { 33 visibility = [ ":*" ] 34 include_dirs = [ 35 "service", 36 "client", 37 "utils", 38 "${target_gen_dir}", 39 ] 40 cflags_cc = [ "-fexceptions" ] 41} 42 43ohos_shared_library("test_server_service") { 44 configs = [ ":test_server_service_config" ] 45 46 output_values = get_target_outputs(":test_server_interface") 47 sources = [ 48 "${target_gen_dir}/test_server_interface_stub.cpp", 49 "service/test_server_service.cpp", 50 "${target_gen_dir}/types.cpp", 51 ] 52 sources += filter_include(output_values, [ "test_server_interface_stub.cpp" ]) 53 54 deps = [ ":test_server_interface" ] 55 56 external_deps = [ 57 "access_token:libaccesstoken_sdk", 58 "access_token:libtokenid_sdk", 59 "c_utils:utils", 60 "common_event_service:cesfwk_innerkits", 61 "hilog:libhilog", 62 "hiview:libucollection_utility", 63 "init:libbegetutil", 64 "ipc:ipc_core", 65 "pasteboard:pasteboard_client", 66 "pasteboard:pasteboard_data", 67 "safwk:system_ability_fwk", 68 "samgr:samgr_proxy", 69 "soc_perf:socperf_client", 70 "window_manager:session_manager_lite", 71 "ability_runtime:app_manager", 72 ] 73 74 if (defined(global_parts_info) && defined(global_parts_info.distributeddatamgr_udmf)) { 75 external_deps += [ 76 "udmf:udmf_client", 77 ] 78 } 79 80 part_name = "arkxtest" 81 subsystem_name = "testfwk" 82} 83 84config("test_server_client_config") { 85 visibility = [ ":*" ] 86 include_dirs = [ 87 "client", 88 "utils", 89 "${target_gen_dir}", 90 ] 91} 92 93ohos_shared_library("test_server_client") { 94 public_configs = [ ":test_server_client_config" ] 95 96 output_values = get_target_outputs(":test_server_interface") 97 sources = [ 98 "${target_gen_dir}/test_server_interface_proxy.cpp", 99 "client/test_server_client.cpp", 100 "${target_gen_dir}/types.cpp", 101 ] 102 sources += 103 filter_include(output_values, [ "test_server_interface_proxy.cpp" ]) 104 105 deps = [ ":test_server_interface" ] 106 107 external_deps = [ 108 "ability_base:want", 109 "c_utils:utils", 110 "common_event_service:cesfwk_innerkits", 111 "hilog:libhilog", 112 "ipc:ipc_core", 113 "samgr:samgr_proxy", 114 ] 115 116 part_name = "arkxtest" 117 subsystem_name = "testfwk" 118} 119