# Copyright (C) 2023-2025 Huawei Device Co., Ltd.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import("//build/ohos.gni")
import("../app_domain_verify.gni")
config("app_domain_verify_service_config") {
visibility = [ ":*" ]
include_dirs = [
"${app_domain_verify_client_path}/include",
"${app_domain_verify_client_path}/include/sa_interface",
"include/manager/constant",
"include/manager/core",
"include/manager/rdb",
"include/manager/zidl",
"include/manager/filter",
"include/manager/deferred_link",
"include/agent/core",
"${app_domain_verify_common_path}/include",
"${app_domain_verify_common_path}/include/zidl",
"${app_domain_verify_frameworks_common_path}/include",
"${app_domain_verify_frameworks_common_path}/include/utils",
"${app_domain_verify_frameworks_common_path}/include/permission",
"${app_domain_verify_frameworks_common_path}/include/bms",
"${app_domain_verify_frameworks_common_path}/include/config",
"${app_domain_verify_frameworks_common_path}/include/dfx",
"${app_domain_verify_frameworks_app_details_rdb_path}/include",
]
configs = [ "//build/config/compiler:exceptions" ]
ldflags = [ "-Wl,--exclude-libs=ALL" ]
cflags = [
"-fvisibility=hidden",
"-fdata-sections",
"-ffunction-sections",
"-fstack-protector-strong",
"-D_FORTIFY_SOURCE=2",
"-Os",
]
cflags_cc = [
"-fvisibility-inlines-hidden",
"-Os",
"-fstack-protector-strong",
]
}
ohos_shared_library("app_domain_verify_mgr_service") {
branch_protector_ret = "pac_ret"
sources = [
"${app_domain_verify_frameworks_common_path}/src/bms/bundle_info_query.cpp",
"${app_domain_verify_frameworks_common_path}/src/config/white_list_config_mgr.cpp",
"${app_domain_verify_frameworks_common_path}/src/permission/permission_manager.cpp",
"${app_domain_verify_frameworks_common_path}/src/utils/domain_url_util.cpp",
"src/manager/core/app_details_data_mgr.cpp",
"src/manager/core/app_domain_verify_data_mgr.cpp",
"src/manager/core/app_domain_verify_mgr_service.cpp",
"src/manager/deferred_link/ability_filter.cpp",
"src/manager/deferred_link/deferred_link_mgr.cpp",
"src/manager/filter/app_details_filter.cpp",
"src/manager/rdb/app_domain_verify_rdb_data_manager.cpp",
"src/manager/rdb/app_domain_verify_rdb_open_callback.cpp",
"src/manager/rdb/rdb_migrate_mgr.cpp",
"src/manager/zidl/app_domain_verify_mgr_service_proxy.cpp",
"src/manager/zidl/app_domain_verify_mgr_service_stub.cpp",
]
public_configs = [ ":app_domain_verify_service_config" ]
deps = [
"${app_domain_verify_client_path}:app_domain_verify_agent_client",
"${app_domain_verify_common_path}:app_domain_verify_common",
"${app_domain_verify_frameworks_app_details_rdb_path}:app_domain_verify_app_details_rdb",
]
defines = [ "API_EXPORT=__attribute__((visibility (\"default\")))" ]
if (build_variant == "user") {
defines += [ "IS_RELEASE_VERSION" ]
}
external_deps = [
"ability_base:base",
"ability_base:want",
"ability_base:zuri",
"ability_runtime:ability_manager",
"access_token:libaccesstoken_sdk",
"access_token:libtokenid_sdk",
"bundle_framework:appexecfwk_base",
"bundle_framework:appexecfwk_core",
"cJSON:cjson",
"c_utils:utils",
"common_event_service:cesfwk_innerkits",
"eventhandler:libeventhandler",
"ffrt:libffrt",
"hilog:libhilog",
"hisysevent:libhisysevent",
"ipc:ipc_core",
"os_account:os_account_innerkits",
"preferences:native_preferences",
"relational_store:native_rdb",
"safwk:system_ability_fwk",
"samgr:samgr_proxy",
"selinux_adapter:librestorecon"
]
sanitize = {
boundary_sanitize = true
cfi = true
cfi_cross_dso = true
debug = false
integer_overflow = true
ubsan = true
}
subsystem_name = "bundlemanager"
part_name = "app_domain_verify"
}
config("app_domain_verify_agent_service_config") {
visibility = [ ":*" ]
include_dirs = [
"${app_domain_verify_client_path}/include",
"${app_domain_verify_client_path}/include/sa_interface",
"include/agent/core",
"include/agent/zidl",
"include/manager/core",
"include/manager/zidl",
"include/manager/rdb",
"include/manager/filter",
"${app_domain_verify_common_path}/include",
"${app_domain_verify_common_path}/include/zidl",
"${app_domain_verify_frameworks_common_path}/include",
"${app_domain_verify_frameworks_common_path}/include/utils",
"${app_domain_verify_frameworks_common_path}/include/permission",
"${app_domain_verify_frameworks_common_path}/include/bms",
"${app_domain_verify_frameworks_common_path}/include/config",
"${app_domain_verify_frameworks_extension_path}/include",
"${app_domain_verify_frameworks_verifier_path}/include",
"${app_domain_verify_frameworks_app_details_rdb_path}/include",
"${app_domain_verify_frameworks_common_path}/include/dfx",
]
configs = [ "//build/config/compiler:exceptions" ]
ldflags = [ "-Wl,--exclude-libs=ALL" ]
cflags = [
"-fvisibility=hidden",
"-fdata-sections",
"-ffunction-sections",
"-fstack-protector-strong",
"-D_FORTIFY_SOURCE=2",
"-Os",
]
cflags_cc = [
"-fvisibility-inlines-hidden",
"-Os",
"-fstack-protector-strong",
]
}
ohos_shared_library("app_domain_verify_agent_service") {
branch_protector_ret = "pac_ret"
sources = [
"src/agent/core/app_domain_verify_agent_service.cpp",
"src/agent/zidl/app_domain_verify_agent_service_proxy.cpp",
"src/agent/zidl/app_domain_verify_agent_service_stub.cpp",
]
public_configs = [ ":app_domain_verify_agent_service_config" ]
defines = [ "API_EXPORT=__attribute__((visibility (\"default\")))" ]
if (build_variant == "user") {
defines += [ "IS_RELEASE_VERSION" ]
}
deps = [
"${app_domain_verify_client_path}:app_domain_verify_mgr_client",
"${app_domain_verify_common_path}:app_domain_verify_common",
"${app_domain_verify_frameworks_app_details_rdb_path}:app_domain_verify_app_details_rdb",
"${app_domain_verify_frameworks_common_path}:app_domain_verify_frameworks_common",
"${app_domain_verify_frameworks_extension_path}:app_domain_verify_extension_framework",
"${app_domain_verify_frameworks_verifier_path}:app_domain_verify_agent_verifier",
]
external_deps = [
"ability_base:base",
"ability_base:want",
"ability_base:zuri",
"ability_runtime:ability_manager",
"bundle_framework:appexecfwk_core",
"cJSON:cjson",
"c_utils:utils",
"curl:curl_shared",
"eventhandler:libeventhandler",
"ffrt:libffrt",
"hicollie:libhicollie",
"hilog:libhilog",
"hisysevent:libhisysevent",
"ipc:ipc_core",
"netmanager_base:net_conn_manager_if",
"netstack:http_client",
"os_account:os_account_innerkits",
"preferences:native_preferences",
"safwk:system_ability_fwk",
"samgr:samgr_proxy",
]
sanitize = {
boundary_sanitize = true
cfi = true
cfi_cross_dso = true
debug = false
integer_overflow = true
ubsan = true
}
subsystem_name = "bundlemanager"
part_name = "app_domain_verify"
}