From 416d603b6a7f8f1f8727e1c9e51c60303cedaf0f Mon Sep 17 00:00:00 2001 From: liujia178 Date: Tue, 18 Mar 2025 20:06:09 +0800 Subject: [PATCH] format directory structure Signed-off-by: liujia178 Change-Id: I5ddf92dd0a11e2e6b381dd1e2de8339814dc0ba5 --- bundle.json | 2 +- interfaces/ani/arktsconfig.json | 18 ----------- interfaces/ets/ani/BUILD.gn | 24 ++++++++++++++ interfaces/{ani => ets/ani/hilog}/BUILD.gn | 32 ++++++++----------- .../ani/hilog/ets}/@ohos.hilog.ets | 0 .../ani/hilog/include}/hilog_ani.h | 0 .../{ani => ets/ani/hilog/src}/hilog_ani.cpp | 0 7 files changed, 38 insertions(+), 38 deletions(-) delete mode 100644 interfaces/ani/arktsconfig.json create mode 100644 interfaces/ets/ani/BUILD.gn rename interfaces/{ani => ets/ani/hilog}/BUILD.gn (64%) rename interfaces/{ani => ets/ani/hilog/ets}/@ohos.hilog.ets (100%) rename interfaces/{ani => ets/ani/hilog/include}/hilog_ani.h (100%) rename interfaces/{ani => ets/ani/hilog/src}/hilog_ani.cpp (100%) diff --git a/bundle.json b/bundle.json index bdc365b..02428af 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 5da6e2c..0000000 --- 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 0000000..2f7c2ab --- /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 287e9b6..a3fbf2f 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 -- Gitee