• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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("fileshare_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 = [ "src/ani_file_share.cpp" ]
30
31  include_dirs = [
32    "include",
33    "../../../common/include",
34    "${app_file_service_path}/interfaces/innerkits/native/file_share/include",
35  ]
36
37  deps =
38      [ "${app_file_service_path}/interfaces/innerkits/native:fileuri_native" ]
39
40  external_deps = [
41    "ability_base:want",
42    "ability_base:zuri",
43    "ability_runtime:abilitykit_native",
44    "ability_runtime:extensionkit_native",
45    "ability_runtime:uri_permission_mgr",
46    "access_token:libaccesstoken_sdk",
47    "access_token:libtokenid_sdk",
48    "bundle_framework:appexecfwk_base",
49    "c_utils:utils",
50    "common_event_service:cesfwk_innerkits",
51    "data_share:datashare_common",
52    "data_share:datashare_consumer",
53    "file_api:filemgmt_libhilog",
54    "file_api:filemgmt_libn",
55    "file_api:remote_uri_native",
56    "hilog:libhilog",
57    "init:libbegetutil",
58    "ipc:ipc_core",
59    "napi:ace_napi",
60    "runtime_core:ani",
61  ]
62  part_name = "app_file_service"
63  subsystem_name = "filemanagement"
64  output_extension = "so"
65}
66
67generate_static_abc("fileshare_abc") {
68  base_url = "./ets"
69  files = [ "./ets/@ohos.fileshare.ets" ]
70  dst_file = "$target_out_dir/fileshare.abc"
71  out_puts = [ "$target_out_dir/fileshare.abc" ]
72  is_boot_abc = "True"
73  device_dst_file = "/system/framework/fileshare.abc"
74}
75
76ohos_prebuilt_etc("fileshare_abc_etc") {
77  source = "$target_out_dir/fileshare.abc"
78  module_install_dir = "framework"
79  subsystem_name = "filemanagement"
80  part_name = "app_file_service"
81  deps = [ ":fileshare_abc" ]
82}
83
84group("fileshare_ani_package") {
85  deps = [
86    ":fileshare_abc_etc",
87    ":fileshare_ani",
88  ]
89}
90