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 "${ability_runtime_services_path}/common/include", 23 "${ability_runtime_kits_path}/ability/native/include/continuation/distributed", 24 "${ability_runtime_kits_path}/ability/native/include/continuation/kits", 25 "${ability_runtime_kits_path}/appkit/native/app/include", 26 "${ability_runtime_napi_path}/inner/napi_common", 27 "${access_token_path}/interfaces/innerkits/accesstoken/include", 28 "${user_file_service_path}/interfaces/kits/js/src/common", 29 ] 30 31 cflags = [] 32 if (target_cpu == "arm") { 33 cflags += [ "-DBINDER_IPC_32BIT" ] 34 } 35} 36 37config("ability_public_config") { 38 visibility = [ ":*" ] 39 include_dirs = [ 40 "include", 41 "${user_file_service_path}/utils", 42 "${ability_runtime_kits_path}/appkit/native/ability_runtime/app", 43 "${ability_runtime_kits_path}/appkit/native/app/include", 44 "${ability_runtime_kits_path}/appkit/native/ability_runtime/context", 45 "${user_file_service_path}/services/native/file_access_service/include", 46 "${user_file_service_path}/interfaces/kits/js/src/common", 47 ] 48} 49 50ohos_shared_library("file_access_extension_ability_kit") { 51 include_dirs = [ 52 "${ability_runtime_path}/interfaces/kits/native/appkit/ability_runtime/context", 53 "${file_api_path}/utils/filemgmt_libn/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/file_access_ext_ability.cpp", 60 "src/file_access_ext_connection.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 "hilog:libhilog", 90 "hitrace:hitrace_meter", 91 "image_framework:image_native", 92 "ipc:ipc_core", 93 "napi:ace_napi", 94 "samgr:samgr_proxy", 95 ] 96 97 subsystem_name = "filemanagement" 98 part_name = "user_file_service" 99 innerapi_tags = [ "platformsdk" ] 100} 101 102ohos_shared_library("file_access_extension_ability_module") { 103 sources = [ "src/file_access_ext_ability_module_loader.cpp" ] 104 105 configs = [ ":ability_config" ] 106 public_configs = [ ":ability_public_config" ] 107 108 deps = [ ":file_access_extension_ability_kit" ] 109 110 external_deps = [ 111 "ability_runtime:abilitykit_native", 112 "ability_runtime:runtime", 113 "bundle_framework:appexecfwk_base", 114 "c_utils:utils", 115 "common_event_service:cesfwk_innerkits", 116 "hilog:libhilog", 117 "napi:ace_napi", 118 ] 119 120 relative_install_dir = "extensionability/" 121 subsystem_name = "filemanagement" 122 part_name = "user_file_service" 123} 124