1# Copyright (c) 2021-2022 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/config/components/ets_frontend/ets2abc_config.gni") 15import("//build/ohos.gni") 16import("//foundation/distributeddatamgr/udmf/udmf.gni") 17 18config("ani_config") { 19 include_dirs = [ 20 "native/include", 21 "${udmf_interfaces_path}/cj/include", 22 "${udmf_interfaces_path}/innerkits/data/", 23 "${udmf_interfaces_path}/innerkits/common", 24 ] 25} 26 27group("udmf_data_ani") { 28 deps = [ 29 ":unifiedDataChannel_abc_etc", 30 ":unifieddatachannel_ani", 31 ":uniformTypeDescriptor_abc_etc", 32 ":uniformTypeDescriptor_ani", 33 ] 34} 35 36ohos_shared_library("unifieddatachannel_ani") { 37 branch_protector_ret = "pac_ret" 38 sanitize = { 39 oundary_sanitize = true 40 ubsan = true 41 cfi = true 42 cfi_cross_dso = true 43 debug = false 44 } 45 sources = [ "native/src/unifieddatachannel_ani.cpp" ] 46 47 public_configs = [ ":ani_config" ] 48 49 deps = [ "${udmf_interfaces_path}/innerkits:udmf_client" ] 50 51 external_deps = [ 52 "ability_base:want", 53 "ability_runtime:abilitykit_native", 54 "ability_runtime:ani_common", 55 "ability_runtime:appkit_native", 56 "ability_runtime:napi_common", 57 "c_utils:utils", 58 "hilog:libhilog", 59 "image_framework:image_ani", 60 "ipc:ipc_single", 61 "runtime_core:ani", 62 ] 63 64 subsystem_name = "distributeddatamgr" 65 part_name = "udmf" 66 output_extension = "so" 67} 68 69generate_static_abc("unifiedDataChannel_abc") { 70 base_url = "./ets" 71 files = [ "./ets/@ohos.data.unifiedDataChannel.ets" ] 72 dst_file = "$target_out_dir/data_unifiedDataChannel.abc" 73 out_puts = [ "$target_out_dir/data_unifiedDataChannel.abc" ] 74 is_boot_abc = "True" 75 device_dst_file = "/system/framework/data_unifiedDataChannel.abc" 76} 77 78ohos_prebuilt_etc("unifiedDataChannel_abc_etc") { 79 source = "$target_out_dir/data_unifiedDataChannel.abc" 80 module_install_dir = "framework" 81 subsystem_name = "distributeddatamgr" 82 part_name = "udmf" 83 deps = [ ":unifiedDataChannel_abc" ] 84} 85 86ohos_shared_library("uniformTypeDescriptor_ani") { 87 branch_protector_ret = "pac_ret" 88 sanitize = { 89 oundary_sanitize = true 90 ubsan = true 91 cfi = true 92 cfi_cross_dso = true 93 debug = false 94 } 95 public_configs = [ ":ani_config" ] 96 sources = [ "native/src/uniformTypeDescriptor_ani.cpp" ] 97 98 deps = [ 99 "../innerkits:udmf_client", 100 "../innerkits:utd_client", 101 "../jskits:udmf_js_common", 102 ] 103 104 external_deps = [ 105 "ability_runtime:abilitykit_native", 106 "c_utils:utils", 107 "hilog:libhilog", 108 "runtime_core:ani", 109 ] 110 111 subsystem_name = "distributeddatamgr" 112 part_name = "udmf" 113 output_extension = "so" 114} 115 116generate_static_abc("uniformTypeDescriptor_abc") { 117 base_url = "./ets" 118 files = [ "./ets/@ohos.data.uniformTypeDescriptor.ets" ] 119 dst_file = "$target_out_dir/data_uniformTypeDescriptor.abc" 120 out_puts = [ "$target_out_dir/data_uniformTypeDescriptor.abc" ] 121 is_boot_abc = "True" 122 device_dst_file = "/system/framework/data_uniformTypeDescriptor.abc" 123} 124 125ohos_prebuilt_etc("uniformTypeDescriptor_abc_etc") { 126 source = "$target_out_dir/data_uniformTypeDescriptor.abc" 127 module_install_dir = "framework" 128 subsystem_name = "distributeddatamgr" 129 part_name = "udmf" 130 deps = [ ":uniformTypeDescriptor_abc" ] 131} 132