1# Copyright (C) 2025-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("//build/ohos/taihe_idl/taihe.gni") 17import("../../../../app_domain_verify.gni") 18 19subsystem_name = "bundlemanager" 20part_name = "app_domain_verify" 21taihe_generated_file_path = "$taihe_file_path/out/$subsystem_name/$part_name" 22 23copy_taihe_idl("copy_taihe") { 24 sources = [ 25 "${app_domain_verify_kits_path}/ani/idl/ohos.bundle.appDomainVerify.taihe", 26 ] 27} 28 29ohos_taihe("run_taihe") { 30 taihe_generated_file_path = "$taihe_generated_file_path" 31 deps = [ ":copy_taihe" ] 32 outputs = [ 33 "$taihe_generated_file_path/src/ohos.bundle.appDomainVerify.ani.cpp", 34 "$taihe_generated_file_path/src/ohos.bundle.appDomainVerify.abi.c", 35 ] 36} 37 38taihe_shared_library("app_domain_verify_ani") { 39 taihe_generated_file_path = "$taihe_generated_file_path" 40 subsystem_name = "$subsystem_name" 41 part_name = "$part_name" 42 include_dirs = [ 43 "include", 44 "${app_domain_verify_client_path}/include", 45 "${app_domain_verify_common_path}/include", 46 "${app_domain_verify_common_path}/include/zidl", 47 "${app_domain_verify_kits_path}/common/include", 48 ] 49 sources = get_target_outputs(":run_taihe") 50 sources += [ 51 "${app_domain_verify_kits_path}/ani/src/ani_constructor.cpp", 52 "${app_domain_verify_kits_path}/ani/src/ohos.bundle.appDomainVerify.impl.cpp", 53 "${app_domain_verify_kits_path}/common/src/api_event_reporter.cpp", 54 "${app_domain_verify_kits_path}/common/src/config_parser.cpp", 55 ] 56 deps = [ 57 ":run_taihe", 58 "${app_domain_verify_client_path}:app_domain_verify_mgr_client", 59 "${app_domain_verify_common_path}:app_domain_verify_common", 60 ] 61 if (os_level == "standard") { 62 sanitize = { 63 cfi = true 64 cfi_cross_dso = true 65 debug = false 66 } 67 } 68 cflags = [ 69 "-DHILOG_ENABLE", 70 "-fPIC", 71 "-g3", 72 ] 73 external_deps = [ 74 "ability_base:want", 75 "bundle_framework:appexecfwk_base", 76 "c_utils:utils", 77 "hiappevent:hiappevent_innerapi", 78 "hilog:libhilog", 79 "ipc:ipc_core", 80 "napi:ace_napi", 81 "runtime_core:ani", 82 "safwk:system_ability_fwk", 83 "samgr:samgr_proxy", 84 ] 85} 86 87generate_static_abc("app_domain_verify_ets") { 88 base_url = "$taihe_generated_file_path" 89 files = [ "$taihe_generated_file_path/@ohos.bundle.appDomainVerify.ets" ] 90 is_boot_abc = "True" 91 device_dst_file = "/system/framework/app_domain_verify_ets.abc" 92 dependencies = [ ":run_taihe" ] 93} 94 95generate_static_abc("app_domain_verify_test") { 96 base_url = "${app_domain_verify_kits_path}/ani/test" 97 files = [ "${app_domain_verify_kits_path}/ani/test/test_main.ets" ] 98 is_boot_abc = "True" 99 device_dst_file = "/system/framework/app_domain_verify_test.abc" 100} 101 102ohos_prebuilt_etc("app_domain_verify_etc") { 103 source = "$target_out_dir/app_domain_verify_ets.abc" 104 module_install_dir = "framework" 105 part_name = "$part_name" 106 subsystem_name = "$subsystem_name" 107 deps = [ 108 ":app_domain_verify_ets", 109 # ":app_domain_verify_test", 110 ] 111} 112 113group("appdomainverify_ani") { 114 deps = [ 115 ":app_domain_verify_ani", 116 ":app_domain_verify_etc", 117 ] 118} 119