10fbfc30aSopenharmony_ci# Copyright (c) 2021 Huawei Device Co., Ltd. 20fbfc30aSopenharmony_ci# Licensed under the Apache License, Version 2.0 (the "License"); 30fbfc30aSopenharmony_ci# you may not use this file except in compliance with the License. 40fbfc30aSopenharmony_ci# You may obtain a copy of the License at 50fbfc30aSopenharmony_ci# 60fbfc30aSopenharmony_ci# http://www.apache.org/licenses/LICENSE-2.0 70fbfc30aSopenharmony_ci# 80fbfc30aSopenharmony_ci# Unless required by applicable law or agreed to in writing, software 90fbfc30aSopenharmony_ci# distributed under the License is distributed on an "AS IS" BASIS, 100fbfc30aSopenharmony_ci# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 110fbfc30aSopenharmony_ci# See the License for the specific language governing permissions and 120fbfc30aSopenharmony_ci# limitations under the License. 130fbfc30aSopenharmony_ci 140fbfc30aSopenharmony_ciimport("//arkcompiler/ets_frontend/es2panda/es2abc_config.gni") 150fbfc30aSopenharmony_ciimport("//build/ohos.gni") 160fbfc30aSopenharmony_ci 170fbfc30aSopenharmony_ciconfig("calendarmanager_public_config") { 180fbfc30aSopenharmony_ci include_dirs = [ 190fbfc30aSopenharmony_ci "./common", 200fbfc30aSopenharmony_ci "./native/include", 210fbfc30aSopenharmony_ci "./napi/include", 220fbfc30aSopenharmony_ci ] 230fbfc30aSopenharmony_ci configs = [ "//build/config/compiler:exceptions" ] 240fbfc30aSopenharmony_ci} 250fbfc30aSopenharmony_ci 260fbfc30aSopenharmony_cijspath = "js/editor.js" 270fbfc30aSopenharmony_ci 280fbfc30aSopenharmony_ci# compile .js to .abc. 290fbfc30aSopenharmony_ciaction("gen_editor_abc") { 300fbfc30aSopenharmony_ci visibility = [ ":*" ] 310fbfc30aSopenharmony_ci script = "../../../../arkcompiler/ets_frontend/es2panda/scripts/generate_js_bytecode.py" 320fbfc30aSopenharmony_ci 330fbfc30aSopenharmony_ci args = [ 340fbfc30aSopenharmony_ci "--src-js", 350fbfc30aSopenharmony_ci rebase_path(jspath), 360fbfc30aSopenharmony_ci "--dst-file", 370fbfc30aSopenharmony_ci rebase_path(target_out_dir + "/editor.abc"), 380fbfc30aSopenharmony_ci "--frontend-tool-path", 390fbfc30aSopenharmony_ci rebase_path("${es2abc_build_path}"), 400fbfc30aSopenharmony_ci "--module", 410fbfc30aSopenharmony_ci ] 420fbfc30aSopenharmony_ci deps = [ "../../../../arkcompiler/ets_frontend/es2panda:es2panda_build" ] 430fbfc30aSopenharmony_ci inputs = [ jspath ] 440fbfc30aSopenharmony_ci outputs = [ target_out_dir + "/editor.abc" ] 450fbfc30aSopenharmony_ci} 460fbfc30aSopenharmony_ci 470fbfc30aSopenharmony_cibase_output_path = get_label_info(":editor_js", "target_out_dir") 480fbfc30aSopenharmony_cieditor_obj_path = base_output_path + "/editor.o" 490fbfc30aSopenharmony_cigen_js_obj("editor_js") { 500fbfc30aSopenharmony_ci input = jspath 510fbfc30aSopenharmony_ci output = editor_obj_path 520fbfc30aSopenharmony_ci dep = ":gen_editor_abc" 530fbfc30aSopenharmony_ci} 540fbfc30aSopenharmony_ci 550fbfc30aSopenharmony_ciabc_output_path = get_label_info(":editor_abc", "target_out_dir") 560fbfc30aSopenharmony_cieditor_abc_obj_path = abc_output_path + "/editor_abc.o" 570fbfc30aSopenharmony_cigen_js_obj("editor_abc") { 580fbfc30aSopenharmony_ci input = "$target_out_dir/editor.abc" 590fbfc30aSopenharmony_ci output = editor_abc_obj_path 600fbfc30aSopenharmony_ci dep = ":gen_editor_abc" 610fbfc30aSopenharmony_ci} 620fbfc30aSopenharmony_ci 630fbfc30aSopenharmony_ciohos_shared_library("calendarmanager") { 640fbfc30aSopenharmony_ci sources = [ 650fbfc30aSopenharmony_ci "./napi/src/calendar_enum_napi.cpp", 660fbfc30aSopenharmony_ci "./napi/src/calendar_manager_napi.cpp", 670fbfc30aSopenharmony_ci "./napi/src/calendar_napi.cpp", 680fbfc30aSopenharmony_ci "./napi/src/event_filter_napi.cpp", 690fbfc30aSopenharmony_ci "./napi/src/module_init.cpp", 700fbfc30aSopenharmony_ci "./napi/src/module_register.cpp", 710fbfc30aSopenharmony_ci "./napi/src/napi_env.cpp", 720fbfc30aSopenharmony_ci "./napi/src/napi_queue.cpp", 730fbfc30aSopenharmony_ci "./napi/src/napi_util.cpp", 740fbfc30aSopenharmony_ci "./native/src/calendar_env.cpp", 750fbfc30aSopenharmony_ci "./native/src/data_share_helper_manager.cpp", 760fbfc30aSopenharmony_ci "./native/src/event_filter.cpp", 770fbfc30aSopenharmony_ci "./native/src/native_calendar.cpp", 780fbfc30aSopenharmony_ci "./native/src/native_calendar_manager.cpp", 790fbfc30aSopenharmony_ci "./native/src/native_util.cpp", 800fbfc30aSopenharmony_ci ] 810fbfc30aSopenharmony_ci 820fbfc30aSopenharmony_ci deps = [ 830fbfc30aSopenharmony_ci ":editor_abc", 840fbfc30aSopenharmony_ci ":editor_js", 850fbfc30aSopenharmony_ci ] 860fbfc30aSopenharmony_ci 870fbfc30aSopenharmony_ci public_configs = [ ":calendarmanager_public_config" ] 880fbfc30aSopenharmony_ci 890fbfc30aSopenharmony_ci external_deps = [ 900fbfc30aSopenharmony_ci "ability_base:want", 910fbfc30aSopenharmony_ci "ability_base:zuri", 920fbfc30aSopenharmony_ci "ability_runtime:ability_context_native", 930fbfc30aSopenharmony_ci "ability_runtime:ability_manager", 940fbfc30aSopenharmony_ci "ability_runtime:abilitykit_native", 950fbfc30aSopenharmony_ci "ability_runtime:data_ability_helper", 960fbfc30aSopenharmony_ci "ability_runtime:napi_base_context", 970fbfc30aSopenharmony_ci "access_token:libaccesstoken_sdk", 980fbfc30aSopenharmony_ci "ace_engine:ace_uicontent", 990fbfc30aSopenharmony_ci "c_utils:utils", 1000fbfc30aSopenharmony_ci "data_share:datashare_common", 1010fbfc30aSopenharmony_ci "data_share:datashare_consumer", 1020fbfc30aSopenharmony_ci "hilog:libhilog", 1030fbfc30aSopenharmony_ci "ipc:ipc_single", 1040fbfc30aSopenharmony_ci "napi:ace_napi", 1050fbfc30aSopenharmony_ci ] 1060fbfc30aSopenharmony_ci 1070fbfc30aSopenharmony_ci public_deps = [] 1080fbfc30aSopenharmony_ci relative_install_dir = "module" 1090fbfc30aSopenharmony_ci part_name = "calendar_data" 1100fbfc30aSopenharmony_ci subsystem_name = "applications" 1110fbfc30aSopenharmony_ci} 1120fbfc30aSopenharmony_ci 1130fbfc30aSopenharmony_ciohos_static_library("calendarmanager_static") { 1140fbfc30aSopenharmony_ci branch_protector_ret = "pac_ret" 1150fbfc30aSopenharmony_ci sanitize = { 1160fbfc30aSopenharmony_ci cfi = true 1170fbfc30aSopenharmony_ci cfi_cross_dso = true 1180fbfc30aSopenharmony_ci debug = false 1190fbfc30aSopenharmony_ci } 1200fbfc30aSopenharmony_ci sources = [ 1210fbfc30aSopenharmony_ci "./native/src/calendar_env.cpp", 1220fbfc30aSopenharmony_ci "./native/src/data_share_helper_manager.cpp", 1230fbfc30aSopenharmony_ci "./native/src/event_filter.cpp", 1240fbfc30aSopenharmony_ci "./native/src/native_calendar.cpp", 1250fbfc30aSopenharmony_ci "./native/src/native_calendar_manager.cpp", 1260fbfc30aSopenharmony_ci "./native/src/native_util.cpp", 1270fbfc30aSopenharmony_ci ] 1280fbfc30aSopenharmony_ci 1290fbfc30aSopenharmony_ci deps = [] 1300fbfc30aSopenharmony_ci 1310fbfc30aSopenharmony_ci public_configs = [ ":calendarmanager_public_config" ] 1320fbfc30aSopenharmony_ci 1330fbfc30aSopenharmony_ci external_deps = [ 1340fbfc30aSopenharmony_ci "ability_base:want", 1350fbfc30aSopenharmony_ci "ability_base:zuri", 1360fbfc30aSopenharmony_ci "ability_runtime:ability_context_native", 1370fbfc30aSopenharmony_ci "ability_runtime:ability_manager", 1380fbfc30aSopenharmony_ci "ability_runtime:abilitykit_native", 1390fbfc30aSopenharmony_ci "ability_runtime:data_ability_helper", 1400fbfc30aSopenharmony_ci "ability_runtime:napi_base_context", 1410fbfc30aSopenharmony_ci "c_utils:utils", 1420fbfc30aSopenharmony_ci "data_share:datashare_common", 1430fbfc30aSopenharmony_ci "data_share:datashare_consumer", 1440fbfc30aSopenharmony_ci "hilog:libhilog", 1450fbfc30aSopenharmony_ci "ipc:ipc_single", 1460fbfc30aSopenharmony_ci "napi:ace_napi", 1470fbfc30aSopenharmony_ci ] 1480fbfc30aSopenharmony_ci 1490fbfc30aSopenharmony_ci public_deps = [] 1500fbfc30aSopenharmony_ci part_name = "calendar_data" 1510fbfc30aSopenharmony_ci subsystem_name = "applications" 1520fbfc30aSopenharmony_ci} 153