1# Copyright (c) 2023 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("../../js_environment.gni") 16 17config("js_environment_config") { 18 include_dirs = [ "${inner_api_path}" ] 19} 20 21config("public_js_environment_config") { 22 include_dirs = [ 23 "${inner_api_path}", 24 "${utils_path}/include", 25 ] 26} 27 28ohos_shared_library("js_environment") { 29 sources = [ 30 "${utils_path}/src/js_env_logger.cpp", 31 "src/js_environment.cpp", 32 "src/source_map.cpp", 33 "src/uncaught_exception_callback.cpp", 34 ] 35 36 configs = [ 37 ":js_environment_config", 38 "${ark_compile_path}/ets_runtime:ark_jsruntime_public_config", 39 ] 40 41 public_configs = [ ":public_js_environment_config" ] 42 43 external_deps = [ 44 "ets_runtime:libark_jsruntime", 45 "ets_utils:console", 46 "eventhandler:libeventhandler", 47 "napi:ace_napi", 48 "napi:ace_napi_ark", 49 ] 50 51 subsystem_name = "ability" 52 innerapi_tags = [ "platformsdk_indirect" ] 53 part_name = "ability_runtime" 54} 55