1# Copyright (c) 2025 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/filemanagement/app_file_service/app_file_service.gni") 17 18ohos_shared_library("fileuri_ani") { 19 branch_protector_ret = "pac_ret" 20 sanitize = { 21 boundary_sanitize = true 22 ubsan = true 23 cfi = true 24 cfi_cross_dso = true 25 debug = false 26 } 27 28 cflags_cc = [ "-Wno-unused-function" ] 29 sources = [ 30 "../../../common/src/common_func.cpp", 31 "src/ani_file_uri.cpp", 32 ] 33 34 include_dirs = [ 35 "include", 36 "../../../common/include", 37 "../../js/file_uri", 38 "${app_file_service_path}/interfaces/innerkits/native/file_uri/include", 39 ] 40 41 deps = 42 [ "${app_file_service_path}/interfaces/innerkits/native:fileuri_native" ] 43 44 external_deps = [ 45 "ability_base:zuri", 46 "bundle_framework:appexecfwk_base", 47 "bundle_framework:appexecfwk_core", 48 "c_utils:utils", 49 "file_api:filemgmt_libhilog", 50 "file_api:filemgmt_libn", 51 "hilog:libhilog", 52 "ipc:ipc_core", 53 "napi:ace_napi", 54 "runtime_core:ani", 55 "samgr:samgr_proxy", 56 ] 57 use_exceptions = true 58 part_name = "app_file_service" 59 subsystem_name = "filemanagement" 60 output_extension = "so" 61} 62 63generate_static_abc("fileuri_abc") { 64 base_url = "./ets" 65 files = [ "./ets/@ohos.file.fileuri.ets" ] 66 dst_file = "$target_out_dir/fileuri.abc" 67 out_puts = [ "$target_out_dir/fileuri.abc" ] 68 is_boot_abc = "True" 69 device_dst_file = "/system/framework/fileuri.abc" 70} 71 72ohos_prebuilt_etc("fileuri_abc_etc") { 73 source = "$target_out_dir/fileuri.abc" 74 module_install_dir = "framework" 75 subsystem_name = "filemanagement" 76 part_name = "app_file_service" 77 deps = [ ":fileuri_abc" ] 78} 79 80group("fileuri_ani_package") { 81 deps = [ 82 ":fileuri_abc_etc", 83 ":fileuri_ani", 84 ] 85} 86