diff --git a/bundle.json b/bundle.json index bdc365b82edbe39ff4df93b49f511561e7b8a781..02428af688efb0f1c956e3748b0b7560aa17ff77 100644 --- a/bundle.json +++ b/bundle.json @@ -43,7 +43,7 @@ "//base/hiviewdfx/hilog/interfaces/native/innerkits:libhilog_base", "//base/hiviewdfx/hilog/interfaces/native/innerkits:libhilog", "//base/hiviewdfx/hilog/interfaces/rust:hilog_rust", - "//base/hiviewdfx/hilog/interfaces/ani:hilogani" + "//base/hiviewdfx/hilog/interfaces/ets/ani:ani_hilog_package" ], "inner_kits": [ { diff --git a/interfaces/ani/arktsconfig.json b/interfaces/ani/arktsconfig.json deleted file mode 100644 index 5da6e2c2bf392d36ad05637da68df9b381c6fb9e..0000000000000000000000000000000000000000 --- a/interfaces/ani/arktsconfig.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "compilerOptions": { - "package": "", - "baseUrl": "./", - "paths": { - "std": [ - "../../../../../arkcompiler/runtime_core/static_core/plugins/ets/stdlib/std" - ], - "escompat": [ - "../../../../../arkcompiler/runtime_core/static_core/plugins/ets/stdlib/escompat" - ] - }, - "outDir": "./cache" - }, - "include": [ - "./*.ets" - ] -} diff --git a/interfaces/ets/ani/BUILD.gn b/interfaces/ets/ani/BUILD.gn new file mode 100644 index 0000000000000000000000000000000000000000..2f7c2ab20cb9143e5492aaa581a9e38335acd4df --- /dev/null +++ b/interfaces/ets/ani/BUILD.gn @@ -0,0 +1,24 @@ +# Copyright (c) 2025 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("//build/ohos.gni") + +group("ani_hilog_package") { + deps = [] + if (support_jsapi) { + deps += [ + "hilog:hilog_ani", + "hilog:hilog_etc", + ] + } +} diff --git a/interfaces/ani/BUILD.gn b/interfaces/ets/ani/hilog/BUILD.gn similarity index 64% rename from interfaces/ani/BUILD.gn rename to interfaces/ets/ani/hilog/BUILD.gn index 287e9b6df470d5f23b97a7e7859df28307755a23..a3fbf2f360dccd4dcd72f370641c742efa8a2d5b 100644 --- a/interfaces/ani/BUILD.gn +++ b/interfaces/ets/ani/hilog/BUILD.gn @@ -15,16 +15,10 @@ import("//base/hiviewdfx/hilog/hilog.gni") import("//build/config/components/ets_frontend/ets2abc_config.gni") import("//build/ohos.gni") -group("hilogani") { - deps = [ - ":hilog_abc_etc", - ":hilog_ani", - ] -} ohos_shared_library("hilog_ani") { - include_dirs = [ "//base/hiviewdfx/hilog/interfaces/ani/" ] - sources = [ "//base/hiviewdfx/hilog/interfaces/ani/hilog_ani.cpp" ] - configs = [ "//base/hiviewdfx/hilog/frameworks/libhilog:libhilog_config" ] + include_dirs = [ "./include" ] + sources = [ "./src/hilog_ani.cpp" ] + configs = [ "../../../../frameworks/libhilog:libhilog_config" ] sanitize = { cfi = true @@ -36,26 +30,27 @@ ohos_shared_library("hilog_ani") { external_deps = [ "bounds_checking_function:libsec_shared", "runtime_core:ani", + "runtime_core:libarkruntime", ] if (!is_mingw && !is_mac && !is_linux) { - deps += [ "//base/hiviewdfx/hilog/interfaces/native/innerkits:libhilog" ] + deps += [ "../../../native/innerkits:libhilog" ] } cflags_cc = [] if (is_mingw) { deps += [ - "//base/hiviewdfx/hilog/interfaces/native/innerkits:libhilog_windows", + "../../../native/innerkits:libhilog_windows", ] defines += [ "__WINDOWS__" ] cflags_cc += [ "-std=c++17" ] } else if (is_mac) { deps += - [ "//base/hiviewdfx/hilog/interfaces/native/innerkits:libhilog_mac" ] + [ "../../../native/innerkits:libhilog_mac" ] defines += [ "__MAC__" ] } else if (is_linux) { deps += - [ "//base/hiviewdfx/hilog/interfaces/native/innerkits:libhilog_linux" ] + [ "../../../native/innerkits:libhilog_linux" ] defines += [ "__LINUX__" ] } @@ -64,18 +59,17 @@ ohos_shared_library("hilog_ani") { output_extension = "so" } -generate_static_abc("hilog_abc") { - arktsconfig = "//base/hiviewdfx/hilog/interfaces/ani/arktsconfig.json" - dst_file = "$target_out_dir/hilog.abc" - out_puts = [ "$target_out_dir/hilog.abc" ] +generate_static_abc("hilog") { + base_url = "./ets" + files = [ "./ets/@ohos.hilog.ets" ] is_boot_abc = "True" device_dst_file = "/system/framework/hilog.abc" } -ohos_prebuilt_etc("hilog_abc_etc") { +ohos_prebuilt_etc("hilog_etc") { source = "$target_out_dir/hilog.abc" module_install_dir = "framework" subsystem_name = "hiviewdfx" part_name = "hilog" - deps = [ ":hilog_abc" ] + deps = [ ":hilog" ] } diff --git a/interfaces/ani/@ohos.hilog.ets b/interfaces/ets/ani/hilog/ets/@ohos.hilog.ets similarity index 100% rename from interfaces/ani/@ohos.hilog.ets rename to interfaces/ets/ani/hilog/ets/@ohos.hilog.ets diff --git a/interfaces/ani/hilog_ani.h b/interfaces/ets/ani/hilog/include/hilog_ani.h similarity index 100% rename from interfaces/ani/hilog_ani.h rename to interfaces/ets/ani/hilog/include/hilog_ani.h diff --git a/interfaces/ani/hilog_ani.cpp b/interfaces/ets/ani/hilog/src/hilog_ani.cpp similarity index 100% rename from interfaces/ani/hilog_ani.cpp rename to interfaces/ets/ani/hilog/src/hilog_ani.cpp