• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 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/app_file_service/app_file_service.gni")
16
17config("file_share_config") {
18  visibility = [ ":*" ]
19  include_dirs = [
20    "file_share/include",
21    "//third_party/json/include",
22    "../../common/include",
23  ]
24}
25
26config("file_uri_config") {
27  visibility = [ ":*" ]
28  include_dirs = [
29    "file_uri/include",
30    "//third_party/json/include",
31    "../../common/include",
32  ]
33}
34
35ohos_shared_library("fileshare_native") {
36  sources = [
37    "../../common/src/json_utils.cpp",
38    "../../common/src/sandbox_helper.cpp",
39    "file_share/src/file_share.cpp",
40  ]
41
42  public_configs = [ ":file_share_config" ]
43
44  external_deps = [
45    "ability_base:base",
46    "ability_base:want",
47    "ability_base:zuri",
48    "access_token:libaccesstoken_sdk",
49    "c_utils:utils",
50    "hilog:libhilog",
51  ]
52
53  part_name = "app_file_service"
54  subsystem_name = "filemanagement"
55}
56
57ohos_shared_library("fileuri_native") {
58  sources = [
59    "../../common/src/common_func.cpp",
60    "../../common/src/json_utils.cpp",
61    "../../common/src/sandbox_helper.cpp",
62    "file_uri/src/file_uri.cpp",
63  ]
64
65  public_configs = [ ":file_uri_config" ]
66
67  external_deps = [
68    "ability_base:zuri",
69    "bundle_framework:appexecfwk_base",
70    "bundle_framework:appexecfwk_core",
71    "c_utils:utils",
72    "hilog:libhilog",
73    "ipc:ipc_core",
74    "samgr:samgr_proxy",
75  ]
76
77  part_name = "app_file_service"
78  subsystem_name = "filemanagement"
79}
80
81ohos_prebuilt_etc("file_share_sandbox.json") {
82  source = "../../common/file_share_sandbox.json"
83  part_name = "app_file_service"
84  subsystem_name = "filemanagement"
85  module_install_dir = "etc/app_file_service"
86}
87
88config("remote_file_share_config") {
89  visibility = [ ":*" ]
90  include_dirs = [
91    "include",
92    "${utils_system_safwk_path}/native/include",
93    "remote_file_share/include",
94    "//third_party/json/include",
95    "${path_base}/include",
96    "../../common/include",
97    ".",
98  ]
99}
100
101ohos_shared_library("remote_file_share_native") {
102  sources = [
103    "../../common/src/json_utils.cpp",
104    "../../common/src/sandbox_helper.cpp",
105    "remote_file_share/src/remote_file_share.cpp",
106  ]
107
108  public_configs = [ ":remote_file_share_config" ]
109
110  external_deps = [
111    "ability_base:zuri",
112    "c_utils:utils",
113    "hilog:libhilog",
114  ]
115
116  innerapi_tags = [ "platformsdk_indirect" ]
117  part_name = "app_file_service"
118  subsystem_name = "filemanagement"
119}
120
121group("app_file_service_native") {
122  deps = [
123    ":fileshare_native",
124    ":fileuri_native",
125    ":remote_file_share_native",
126  ]
127}
128
129group("etc_files") {
130  deps = [ ":file_share_sandbox.json" ]
131}
132