1# Copyright (c) 2022-2023 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("//foundation/filemanagement/user_file_service/filemanagement_aafwk.gni") 16 17config("ability_config") { 18 visibility = [ ":*" ] 19 include_dirs = [ 20 "include", 21 "${user_file_service_path}/utils", 22 "${user_file_service_path}/interfaces/kits/js/src/common", 23 ] 24 25 cflags = [] 26 if (target_cpu == "arm") { 27 cflags += [ "-DBINDER_IPC_32BIT" ] 28 } 29} 30 31config("ability_public_config") { 32 visibility = [ ":*" ] 33 include_dirs = [ 34 "include", 35 "${user_file_service_path}/utils", 36 "${user_file_service_path}/services/native/file_access_service/include", 37 "${user_file_service_path}/interfaces/kits/js/src/common", 38 ] 39} 40 41ohos_shared_library("file_access_extension_ability_kit") { 42 branch_protector_ret = "pac_ret" 43 sanitize = { 44 integer_overflow = true 45 ubsan = true 46 boundary_sanitize = true 47 cfi = true 48 cfi_cross_dso = true 49 debug = false 50 } 51 52 include_dirs = [ 53 "${commonlibrary_path}/c_utils/base/include", 54 "${user_file_service_path}/services/native/file_access_service/include", 55 ] 56 57 sources = [ 58 "${user_file_service_path}/services/native/file_access_service/src/file_access_service_proxy.cpp", 59 "src/app_file_access_ext_connection.cpp", 60 "src/file_access_ext_ability.cpp", 61 "src/file_access_ext_proxy.cpp", 62 "src/file_access_ext_stub.cpp", 63 "src/file_access_ext_stub_impl.cpp", 64 "src/file_access_helper.cpp", 65 "src/js_file_access_ext_ability.cpp", 66 "src/napi_common_fileaccess.cpp", 67 ] 68 configs = [ ":ability_config" ] 69 70 version_script = "libfile_access_extension_ability_kit.map" 71 public_configs = [ 72 ":ability_public_config", 73 "${ability_runtime_path}/frameworks/native/ability:ability_context_public_config", 74 ] 75 76 external_deps = [ 77 "ability_base:want", 78 "ability_base:zuri", 79 "ability_runtime:ability_manager", 80 "ability_runtime:app_context", 81 "ability_runtime:extensionkit_native", 82 "ability_runtime:napi_common", 83 "ability_runtime:runtime", 84 "access_token:libaccesstoken_sdk", 85 "access_token:libtokenid_sdk", 86 "bundle_framework:appexecfwk_base", 87 "bundle_framework:appexecfwk_core", 88 "c_utils:utils", 89 "c_utils:utilsbase", 90 "file_api:filemgmt_libn", 91 "hilog:libhilog", 92 "hitrace:hitrace_meter", 93 "init:libbegetutil", 94 "ipc:ipc_core", 95 "napi:ace_napi", 96 "os_account:os_account_innerkits", 97 "samgr:samgr_proxy", 98 ] 99 100 subsystem_name = "filemanagement" 101 part_name = "user_file_service" 102 innerapi_tags = [ "platformsdk" ] 103} 104 105ohos_shared_library("file_access_extension_ability_module") { 106 branch_protector_ret = "pac_ret" 107 sanitize = { 108 integer_overflow = true 109 ubsan = true 110 boundary_sanitize = true 111 cfi = true 112 cfi_cross_dso = true 113 debug = false 114 } 115 116 sources = [ "src/file_access_ext_ability_module_loader.cpp" ] 117 118 configs = [ ":ability_config" ] 119 public_configs = [ ":ability_public_config" ] 120 121 deps = [ ":file_access_extension_ability_kit" ] 122 123 external_deps = [ 124 "ability_runtime:abilitykit_native", 125 "ability_runtime:runtime", 126 "bundle_framework:appexecfwk_base", 127 "c_utils:utils", 128 "common_event_service:cesfwk_innerkits", 129 "hilog:libhilog", 130 "napi:ace_napi", 131 ] 132 133 relative_install_dir = "extensionability/" 134 subsystem_name = "filemanagement" 135 part_name = "user_file_service" 136} 137