1# Copyright (c) 2021-2022 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") 15import("//foundation/arkui/ace_engine/ace_config.gni") 16 17# build framework bridge 18template("framework_bridge") { 19 forward_variables_from(invoker, "*") 20 21 ohos_source_set(target_name) { 22 subsystem_name = ace_engine_subsystem 23 part_name = ace_engine_part 24 configs = [ "$ace_root:ace_config" ] 25 26 deps = [ 27 "declarative_frontend:declarative_frontend_$platform", 28 29 # bridge source 30 "card_frontend:card_frontend_$platform", 31 "codec:data_codec", 32 "common:bridge_common_$platform", 33 "common/accessibility:bridge_accessibility_$platform", 34 "js_frontend:js_frontend_$platform", 35 "plugin_frontend:plugin_frontend_$platform", 36 ] 37 38 if (defined(config.js_pa_support) && config.js_pa_support) { 39 deps += [ "$ace_root/${config.pa_engine_path}:pa_backend_$platform" ] 40 } 41 } 42} 43 44# build ng framework bridge 45template("framework_bridge_ng") { 46 forward_variables_from(invoker, "*") 47 48 ohos_source_set(target_name) { 49 subsystem_name = ace_engine_subsystem 50 part_name = ace_engine_part 51 configs = [ "$ace_root:ace_config" ] 52 53 deps = [ 54 "codec:data_codec", 55 "common:bridge_common_ng_$platform", 56 "common/accessibility:bridge_accessibility_$platform", 57 "declarative_frontend:declarative_frontend_$platform", 58 ] 59 } 60} 61 62foreach(item, ace_platforms) { 63 framework_bridge("framework_bridge_" + item.name) { 64 platform = item.name 65 config = { 66 } 67 68 if (defined(item.config)) { 69 config = item.config 70 } 71 } 72 73 framework_bridge_ng("framework_bridge_ng_" + item.name) { 74 platform = item.name 75 } 76} 77