1# Copyright (c) 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/ohos.gni") 15import("//foundation/filemanagement/user_file_service/filemanagement_aafwk.gni") 16 17BASE_DIR = "//foundation/filemanagement/user_file_service" 18 19config("ability_config") { 20 visibility = [ ":*" ] 21 include_dirs = [ 22 "include", 23 "${BASE_DIR}/utils", 24 "${ability_runtime_services_path}/common/include", 25 "${ability_runtime_kits_path}/ability/native/include/continuation/distributed", 26 "${ability_runtime_kits_path}/ability/native/include/continuation/kits", 27 "${ability_runtime_kits_path}/appkit/native/app/include", 28 "${ability_runtime_napi_path}/inner/napi_common", 29 "//foundation/aafwk/standard/frameworks/kits/appkit/native/app/include", 30 "//foundation/appexecfwk/standard/interfaces/innerkits/appexecfwk_base/include", 31 "//foundation/bundlemanager/bundle_framework/interfaces/inner_api/appexecfwk_base/include", 32 "//foundation/distributeddatamgr/distributedfile/interfaces/kits/js/src/common", 33 ] 34 35 cflags = [] 36 if (target_cpu == "arm") { 37 cflags += [ "-DBINDER_IPC_32BIT" ] 38 } 39} 40 41config("ability_public_config") { 42 visibility = [ ":*" ] 43 include_dirs = [ 44 "include", 45 "include/notify", 46 "${BASE_DIR}/utils", 47 "${ability_runtime_kits_path}/appkit/native/ability_runtime/app", 48 "${ability_runtime_kits_path}/appkit/native/app/include", 49 "${ability_runtime_kits_path}/appkit/native/ability_runtime/context", 50 ] 51} 52 53ohos_shared_library("file_access_extension_ability_kit") { 54 include_dirs = [ 55 "${ability_runtime_path}/interfaces/kits/native/appkit/ability_runtime/context", 56 "//foundation/communication/ipc/ipc/native/src/napi/include", 57 ] 58 59 sources = [ 60 "src/file_access_ext_ability.cpp", 61 "src/file_access_ext_connection.cpp", 62 "src/file_access_ext_proxy.cpp", 63 "src/file_access_ext_stub.cpp", 64 "src/file_access_ext_stub_impl.cpp", 65 "src/file_access_helper.cpp", 66 "src/js_file_access_ext_ability.cpp", 67 "src/napi_common_fileaccess.cpp", 68 "src/notify/file_access_notify_agent.cpp", 69 "src/notify/file_access_notify_manager.cpp", 70 "src/notify/file_access_notify_proxy.cpp", 71 "src/notify/file_access_notify_stub.cpp", 72 ] 73 configs = [ ":ability_config" ] 74 public_configs = [ 75 ":ability_public_config", 76 "${ability_runtime_path}/frameworks/native/ability:ability_context_public_config", 77 ] 78 79 deps = [ 80 "${ability_runtime_path}/frameworks/native/ability/native:abilitykit_native", 81 "${ability_runtime_path}/frameworks/native/appkit:app_context", 82 ] 83 84 external_deps = [ 85 "ability_base:want", 86 "ability_base:zuri", 87 "ability_runtime:ability_manager", 88 "ability_runtime:runtime", 89 "access_token:libaccesstoken_sdk", 90 "bundle_framework:appexecfwk_core", 91 "c_utils:utils", 92 "hitrace_native:hitrace_meter", 93 "ipc:ipc_core", 94 "samgr:samgr_proxy", 95 ] 96 97 public_deps = [ 98 "//base/hiviewdfx/hilog/interfaces/native/innerkits:libhilog", 99 "//foundation/arkui/napi:ace_napi", 100 ] 101 102 subsystem_name = "filemanagement" 103 part_name = "user_file_service" 104} 105 106ohos_shared_library("file_access_extension_ability_module") { 107 sources = [ "src/file_access_ext_ability_module_loader.cpp" ] 108 109 configs = [ ":ability_config" ] 110 public_configs = [ ":ability_public_config" ] 111 112 deps = [ 113 ":file_access_extension_ability_kit", 114 "${ability_runtime_path}/frameworks/native/ability/native:abilitykit_native", 115 ] 116 117 external_deps = [ 118 "ability_runtime:runtime", 119 "c_utils:utils", 120 ] 121 122 relative_install_dir = "extensionability/" 123 subsystem_name = "filemanagement" 124 part_name = "user_file_service" 125} 126