1# Copyright (c) 2024 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.
13import("//build/config/components/idl_tool/idl.gni")
14import("//build/ohos.gni")
15
16group("app_fwk_update") {
17  deps = [
18    ":app_fwk_update_service",
19    ":app_fwk_update_service_cfg",
20    ":app_fwk_update_service_profile",
21  ]
22}
23
24config("web_sa_interface") {
25  include_dirs = [ "include" ]
26}
27
28idl_interface_sources = [
29  "${target_gen_dir}/app_fwk_update_service_proxy.cpp",
30  "${target_gen_dir}/app_fwk_update_service_stub.cpp",
31]
32
33idl_gen_interface("app_fwk_update_service_interface") {
34  src_idl = rebase_path("IAppFwkUpdateService.idl")
35  dst_file = string_join(",", idl_interface_sources)
36}
37
38ohos_sa_profile("app_fwk_update_service_profile") {
39  sources = [ "8350.json" ]
40  part_name = "webview"
41}
42
43ohos_prebuilt_etc("app_fwk_update_service_cfg") {
44  source = "app_fwk_update_service.cfg"
45  relative_install_dir = "init"
46  subsystem_name = "web"
47  part_name = "webview"
48}
49
50ohos_shared_library("app_fwk_update_service") {
51  defines = [ "HILOG_TAG=\"app_fwk_update_service\"" ]
52  shlib_type = "sa"
53  version_script = "libapp_fwk_update_service.map"
54  output_values = get_target_outputs(":app_fwk_update_service_interface")
55  sources = [
56    "../sa/include/app_fwk_update_service.h",
57    "../sa/src/app_fwk_update_client.cpp",
58    "../sa/src/app_fwk_update_load_callback.cpp",
59    "../sa/src/app_fwk_update_service.cpp",
60  ]
61  sources += filter_include(output_values, [ "*.cpp" ])
62  deps = [ ":app_fwk_update_service_interface" ]
63  public_configs = [ ":web_sa_interface" ]
64  include_dirs = [
65    "../sa/include",
66    "../ohos_nweb/include",
67    "${target_gen_dir}",
68  ]
69
70  cflags = [
71    "-Wall",
72    "-Werror",
73    "-g3",
74  ]
75
76  external_deps = [
77    "ability_base:want",
78    "ability_base:zuri",
79    "ability_runtime:ability_manager",
80    "ability_runtime:napi_common",
81    "appspawn:appspawn_client",
82    "bundle_framework:appexecfwk_base",
83    "bundle_framework:appexecfwk_core",
84    "c_utils:utils",
85    "common_event_service:cesfwk_core",
86    "common_event_service:cesfwk_innerkits",
87    "eventhandler:libeventhandler",
88    "hilog:libhilog",
89    "hitrace:hitrace_meter",
90    "init:libbeget_proxy",
91    "init:libbegetutil",
92    "ipc:ipc_core",
93    "safwk:system_ability_fwk",
94    "samgr:samgr_proxy",
95  ]
96
97  #innerapi_tags = [ "platformsdk" ]
98  subsystem_name = "web"
99  part_name = "webview"
100}
101