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("//build/config/components/ets_frontend/ets2abc_config.gni") 15import("//build/ohos.gni") 16import("//foundation/arkui/ace_engine/ace_config.gni") 17 18group("ani_pluginComponent_group") { 19 deps = [ 20 "${ace_root}/interfaces/ets/ani/pluginComponent:pluginComponent_ani", 21 "${ace_root}/interfaces/ets/ani/pluginComponent:pluginComponent_etc", 22 ] 23} 24 25#构建ANI库 26ohos_shared_library("pluginComponent_ani") { 27 deps = [ "$ace_root/build:libace_compatible" ] 28 include_dirs = [ 29 "$ace_root/frameworks", 30 "$ace_root/interfaces/inner_api/ace_kit/include", 31 "$ace_root/interfaces/inner_api/ui_service_manager/include", 32 ] 33 sources = [ 34 "./src/ani_plugin_callback.cpp", 35 "./src/ani_plugin_callback_mgr.cpp", 36 "./src/ani_plugin_component.cpp", 37 "./src/ani_plugin_component_util.cpp", 38 ] 39 external_deps = [ 40 "ability_base:base", 41 "ability_base:want", 42 "ability_runtime:abilitykit_native", 43 "ability_runtime:ani_common", 44 "ability_runtime:extensionkit_native", 45 "access_token:libtokenid_sdk", 46 "bundle_framework:appexecfwk_core", 47 "c_utils:utils", 48 "hilog:libhilog", 49 "ipc:ipc_core", 50 "napi:ace_napi", 51 "runtime_core:ani" 52 ] 53 configs = [ "$ace_root:ace_config" ] 54 part_name = "ace_engine" 55 subsystem_name = "arkui" 56 output_extension = "so" 57} 58 59#构建abc 60generate_static_abc("pluginComponent") { 61 base_url = "./ets" 62 files = [ "./ets/@ohos.pluginComponent.ets" ] 63 is_boot_abc = "True" 64 device_dst_file = "/system/framework/pluginComponent.abc" 65} 66 67ohos_prebuilt_etc("pluginComponent_etc") { 68 source = "$target_out_dir/pluginComponent.abc" 69 module_install_dir = "framework" 70 part_name = "ace_engine" 71 subsystem_name = "arkui" 72 deps = [ ":pluginComponent" ] 73} 74