1# Copyright (c) 2021-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.
13
14import("//build/ohos.gni")
15
16ability_runtime_path = "//foundation/ability/ability_runtime"
17ability_runtime_napi_path = "${ability_runtime_path}/frameworks/js/napi"
18ability_base_path = "//foundation/ability/ability_base"
19form_fwk_path = "//foundation/ability/form_fwk"
20ability_runtime_innerkits_path = "${ability_runtime_path}/interfaces/inner_api"
21ability_runtime_ndk_path = "${ability_runtime_path}/interfaces/kits/c"
22ability_runtime_native_path = "${ability_runtime_path}/frameworks/native"
23ability_runtime_services_path = "${ability_runtime_path}/services"
24ability_runtime_abilitymgr_path = "${ability_runtime_services_path}/abilitymgr"
25ability_runtime_test_path = "${ability_runtime_path}/test"
26ability_runtime_utils_path = "${ability_runtime_path}/utils"
27ace_engine_path = "//foundation/arkui/ace_engine"
28arkui_path = "//foundation/arkui"
29previewer_path = "//ide/tools/previewer"
30simulator_path = "//foundation/ability/ability_runtime/frameworks/simulator"
31
32bundlefwk_path = "//foundation/bundlemanager/bundle_framework"
33bundlefwk_inner_api_path = "${bundlefwk_path}/interfaces/inner_api"
34c_utils_base_path = "//commonlibrary/c_utils/base"
35ets_utils_path = "//commonlibrary/ets_utils"
36print_fwk_path = "//base/print/print_fwk"
37imf_path = "//base/inputmethod/imf"
38wallpaper_mgr_path = "//base/theme/wallpaper_mgr"
39os_account_path = "//base/account/os_account"
40distributed_notification_service_path =
41    "//base/notification/distributed_notification_service"
42power_manager_path = "//base/powermgr/power_manager"
43request_path = "//base/request/request"
44hiebpf_path = "//developtools/profiler/hiebpf"
45
46multimedia_path = "//foundation/multimedia/image_framework"
47multimodalinput_path = "//foundation/multimodalinput/input"
48windowmanager_path = "//foundation/window/window_manager"
49graphic_path = "//foundation/graphic/graphic_2d"
50global_path = "//base/global"
51distributedschedule_path = "//foundation/systemabilitymgr"
52eventhandler_path = "//base/notification/eventhandler"
53distributeddatamgr_path = "//foundation/distributeddatamgr"
54form_fwk_napi_path = "${form_fwk_path}/frameworks/js/napi"
55ability_base_kits_path = "${ability_base_path}/interfaces/kits/native"
56ability_base_native_path = "${ability_base_path}/frameworks/native"
57appspawn_path = "//base/startup/appspawn"
58init_path = "//base/startup/init"
59ipc_native_path = "//foundation/communication/ipc/ipc/native"
60third_party_path = "//third_party"
61hiviewdfx_path = "//base/hiviewdfx/hiview"
62hilog_path = "//base/hiviewdfx/hilog"
63webview_path = "//base/web/webview"
64resource_management_path = "//base/global/resource_management"
65common_event_service_path = "//base/notification/common_event_service"
66safwk_path = "//utils/system/safwk"
67user_file_service_innerkits_path =
68    "//foundation/filemanagement/user_file_service/interfaces/inner_api"
69resourceschedule_path = "//foundation/resourceschedule"
70device_usage_statistics_path =
71    "//foundation/resourceschedule/device_usage_statistics"
72device_manager_path = "//foundation/distributedhardware/device_manager"
73graphic_2d_path = "//foundation/graphic/graphic_2d"
74srms_inner_api_path =
75    "${ability_runtime_path}/service_router_framework/interfaces/inner_api"
76fuzz_test_output_path = "ability_runtime/ability_runtime"
77accessibility_path = "//foundation/barrierfree/accessibility"
78relational_store_base_path = "//foundation/distributeddatamgr/relational_store"
79relational_store_napi_path = "${relational_store_base_path}/frameworks/js/napi"
80common_tool_path = "//foundation/distributeddatamgr/kv_store/frameworks/common"
81relational_store_common_path = "${relational_store_base_path}/frameworks/common"
82ability_base_path = "//foundation/ability/ability_base"
83ability_base_innerapi_path = "${ability_base_path}/interfaces/inner_api"
84relational_store_innerapi_path =
85    "${relational_store_base_path}/interfaces/inner_api"
86bgtaskmgr_root_path = "//foundation/resourceschedule/background_task_mgr"
87bgtaskmgr_interfaces_path = "${bgtaskmgr_root_path}/interfaces"
88bgtaskmgr_frameworks_path = "${bgtaskmgr_root_path}/frameworks"
89os_account_path = "//base/account/os_account"
90access_token_path = "//base/security/access_token"
91
92declare_args() {
93  background_task_mgr_continuous_task_enable = true
94  resource_schedule_service_enable = true
95  ability_runtime_feature_sandboxmanager = false
96  ability_runtime_power = true
97  ability_runtime_relational = true
98  ability_runtime_ces = true
99  ability_runtime_resource = true
100  ability_runtime_appspawn = true
101  ability_fault_and_exit_test = false
102  ability_command_for_test = false
103  ability_runtime_feature_coverage = false
104  ability_runtime_auto_fill_ability =
105      "com.ohos.passwordbox/entry/AutoFillAbility"
106  ability_runtime_smart_auto_fill_ability =
107      "com.ohos.textautofill/entry/TextAutoFillAbility"
108  cj_frontend = true
109  ability_runtime_app_no_response_dialog = false
110  ability_runtime_app_no_response_bundlename = "com.ohos.taskmanager"
111  include_app_domain_verify = true
112  ability_runtime_start_window_options_with_pixelmap = false
113
114  if (!defined(global_parts_info) ||
115      defined(global_parts_info.account_os_account)) {
116    os_account_part_enabled = true
117  } else {
118    os_account_part_enabled = false
119  }
120
121  if (defined(global_parts_info) &&
122      !defined(global_parts_info.resourceschedule_background_task_mgr)) {
123    background_task_mgr_continuous_task_enable = false
124  }
125
126  if (defined(global_parts_info) &&
127      !defined(global_parts_info.resourceschedule_resource_schedule_service)) {
128    resource_schedule_service_enable = false
129  }
130
131  if (defined(global_parts_info) &&
132      !defined(global_parts_info.powermgr_power_manager)) {
133    ability_runtime_power = false
134  }
135
136  if (defined(global_parts_info) &&
137      !defined(global_parts_info.distributeddatamgr_relational_store)) {
138    ability_runtime_relational = false
139  }
140
141  if (defined(global_parts_info) &&
142      !defined(global_parts_info.notification_common_event_service)) {
143    ability_runtime_ces = false
144  }
145
146  if (defined(global_parts_info) &&
147      !defined(global_parts_info.global_resource_management)) {
148    ability_runtime_resource = false
149  }
150
151  if (defined(global_parts_info) &&
152      !defined(global_parts_info.startup_appspawn)) {
153    ability_runtime_appspawn = false
154  }
155
156  if (!defined(global_parts_info) ||
157      defined(global_parts_info.security_dlp_permission_service)) {
158    os_dlp_part_enabled = true
159  } else {
160    os_dlp_part_enabled = false
161  }
162
163  if (!defined(global_parts_info) ||
164      defined(global_parts_info.barrierfree_accessibility)) {
165    accessibility_enable = true
166  } else {
167    accessibility_enable = false
168  }
169
170  if (!defined(global_parts_info) ||
171      defined(global_parts_info.hiviewdfx_hichecker)) {
172    hichecker_enabled = true
173  } else {
174    hichecker_enabled = false
175  }
176
177  if (defined(global_parts_info) &&
178      !defined(global_parts_info.bundlemanager_app_domain_verify)) {
179    include_app_domain_verify = false
180  }
181
182  if (!defined(global_parts_info) ||
183      defined(global_parts_info.ability_form_fwk)) {
184    form_fwk_enable = true
185  } else {
186    form_fwk_enable = false
187  }
188
189  if (defined(global_parts_info) &&
190      defined(global_parts_info.accesscontrol_sandbox_manager)) {
191    ability_runtime_feature_sandboxmanager = true
192  }
193}
194