1# Copyright (c) 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("//base/security/access_token/access_token.gni") 15import("//build/config/components/ets_frontend/ets2abc_config.gni") 16import("//build/ohos.gni") 17 18ohos_static_library("libani_common") { 19 sanitize = { 20 cfi = true 21 cfi_cross_dso = true 22 debug = false 23 } 24 branch_protector_ret = "pac_ret" 25 26 include_dirs = [ 27 "./include", 28 "${access_token_path}/interfaces/innerkits/accesstoken/include", 29 ] 30 31 sources = [ 32 "src/ani_error.cpp", 33 "src/ani_utils.cpp" 34 ] 35 36 deps = [ "${access_token_path}/frameworks/common:accesstoken_common_cxx" ] 37 cflags_cc = [ "-DHILOG_ENABLE" ] 38 external_deps = [ 39 "hilog:libhilog", 40 "runtime_core:ani", 41 ] 42 43 subsystem_name = "security" 44 part_name = "access_token" 45} 46 47generate_static_abc("Permission_Request_Result") { 48 base_url = "./ets" 49 files = [ "./ets/security/PermissionRequestResult.ets" ] 50 51 is_boot_abc = "True" 52 device_dst_file = "/system/framework/Permission_Request_Result.abc" 53} 54 55ohos_prebuilt_etc("Permission_Request_Result_etc") { 56 source = "$target_out_dir/Permission_Request_Result.abc" 57 deps = [ ":Permission_Request_Result" ] 58 module_install_dir = "framework" 59 part_name = "access_token" 60 subsystem_name = "security" 61} 62 63generate_static_abc("permissions") { 64 base_url = "./ets" 65 files = [ "./ets/permissions.ets" ] 66 67 is_boot_abc = "True" 68 device_dst_file = "/system/framework/permissions.abc" 69} 70 71ohos_prebuilt_etc("permissions_etc") { 72 source = "$target_out_dir/permissions.abc" 73 deps = [ ":permissions" ] 74 module_install_dir = "framework" 75 part_name = "access_token" 76 subsystem_name = "security" 77} 78 79group("common_ets") { 80 deps = [ 81 ":Permission_Request_Result_etc", 82 ":libani_common", 83 ":permissions_etc", 84 ] 85} 86