# Copyright (c) 2023 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("//arkcompiler/ets_frontend/es2panda/es2abc_config.gni") import("//build/ohos.gni") es2abc_gen_abc("gen_webview_export_abc") { src_js = rebase_path("webview_export.js") dst_file = rebase_path(target_out_dir + "/webview_export.abc") in_puts = [ "webview_export.js" ] out_puts = [ target_out_dir + "/webview_export.abc" ] extra_args = [ "--module" ] } gen_js_obj("webview_export_js") { input = "webview_export.js" output = target_out_dir + "/webview_export.o" } gen_js_obj("webview_export_abc") { input = get_label_info(":gen_webview_export_abc", "target_out_dir") + "/webview_export.abc" output = target_out_dir + "/webview_export_abc.o" dep = ":gen_webview_export_abc" } ohos_source_set("webview_register") { sources = [ "webview_export_module.cpp" ] external_deps = [ "napi:ace_napi" ] part_name = "webview" subsystem_name = "web" } group("js_export") { public_deps = [ ":webview_export_abc", ":webview_export_js", ":webview_register", ] }