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("../../../time.gni") 17 18ohos_shared_library("systemdatetime_ani") { 19 sources = [ "src/system_date_time_ani.cpp" ] 20 deps = [ "${api_path}:time_client" ] 21 22 external_deps = [ 23 "ability_runtime:abilitykit_native", 24 "ability_runtime:wantagent_innerkits", 25 "c_utils:utils", 26 "hilog:libhilog", 27 "init:libbegetutil", 28 "runtime_core:ani", 29 "samgr:samgr_proxy", 30 ] 31 32 sanitize = { 33 boundary_sanitize = true 34 ubsan = true 35 cfi = true 36 cfi_cross_dso = true 37 debug = false 38 } 39 40 subsystem_name = "time" 41 part_name = "time_service" 42 output_extension = "so" 43} 44 45generate_static_abc("systemdatetime_abc") { 46 base_url = "./ets" 47 files = [ "./ets/@ohos.systemDateTime.ets" ] 48 dst_file = "$target_out_dir/systemdatetime.abc" 49 out_puts = [ "$target_out_dir/systemdatetime.abc" ] 50 is_boot_abc = "True" 51 device_dst_file = "/system/framework/systemdatetime.abc" 52} 53 54ohos_prebuilt_etc("systemdatetime_abc_etc") { 55 source = "$target_out_dir/systemdatetime.abc" 56 module_install_dir = "framework" 57 subsystem_name = "time" 58 part_name = "time_service" 59 deps = [ ":systemdatetime_abc" ] 60} 61 62group("systemdatetime_ani_package") { 63 deps = [ 64 ":systemdatetime_abc_etc", 65 ":systemdatetime_ani", 66 ] 67} 68