diff --git a/bundle.json b/bundle.json index 72d46dc0..82c27e46 100644 --- a/bundle.json +++ b/bundle.json @@ -93,7 +93,7 @@ "name": "//commonlibrary/ets_utils/js_sys_module/timer:timer", "header": { "header_files": [ - "timer.h" + "sys_timer.h" ], "header_base": "//commonlibrary/ets_utils/js_sys_module/timer" } diff --git a/js_concurrent_module/taskpool/task_manager.cpp b/js_concurrent_module/taskpool/task_manager.cpp index e14b9377..53a750ed 100644 --- a/js_concurrent_module/taskpool/task_manager.cpp +++ b/js_concurrent_module/taskpool/task_manager.cpp @@ -30,7 +30,7 @@ #include "status_receiver_interface.h" #include "system_ability_definition.h" #endif -#include "commonlibrary/ets_utils/js_sys_module/timer/timer.h" +#include "sys_timer.h" #include "helper/concurrent_helper.h" #include "helper/error_helper.h" #include "helper/hitrace_helper.h" diff --git a/js_concurrent_module/taskpool/worker.cpp b/js_concurrent_module/taskpool/worker.cpp index cec01245..5d066971 100644 --- a/js_concurrent_module/taskpool/worker.cpp +++ b/js_concurrent_module/taskpool/worker.cpp @@ -19,7 +19,7 @@ #include "c/executor_task.h" #include "ffrt_inner.h" #endif -#include "commonlibrary/ets_utils/js_sys_module/timer/timer.h" +#include "sys_timer.h" #include "helper/hitrace_helper.h" #include "process_helper.h" #include "task_group.h" diff --git a/js_concurrent_module/worker/BUILD.gn b/js_concurrent_module/worker/BUILD.gn index 728c534b..ffdf407c 100644 --- a/js_concurrent_module/worker/BUILD.gn +++ b/js_concurrent_module/worker/BUILD.gn @@ -106,7 +106,7 @@ ohos_source_set("worker_static") { sources = [ "$js_concurrent_module_common/helper/napi_helper.cpp", - "$sys_module/timer/timer.cpp", + "$sys_module/timer/sys_timer.cpp", "message_queue.cpp", "native_module_worker.cpp", "thread.cpp", @@ -138,7 +138,7 @@ ohos_source_set("worker_static") { ] sources -= [ "$js_concurrent_module_common/helper/napi_helper.cpp", - "$sys_module/timer/timer.cpp", + "$sys_module/timer/sys_timer.cpp", ] defines += [ "__ARKUI_CROSS__" ] deps += [ diff --git a/js_concurrent_module/worker/worker.cpp b/js_concurrent_module/worker/worker.cpp index b0e03787..0cd11800 100644 --- a/js_concurrent_module/worker/worker.cpp +++ b/js_concurrent_module/worker/worker.cpp @@ -15,7 +15,7 @@ #include "worker.h" -#include "commonlibrary/ets_utils/js_sys_module/timer/timer.h" +#include "sys_timer.h" #include "helper/concurrent_helper.h" #include "helper/error_helper.h" #include "helper/hitrace_helper.h" diff --git a/js_sys_module/console/BUILD.gn b/js_sys_module/console/BUILD.gn index faac79c1..16183601 100644 --- a/js_sys_module/console/BUILD.gn +++ b/js_sys_module/console/BUILD.gn @@ -16,7 +16,10 @@ import("//commonlibrary/ets_utils/ets_utils_config.gni") config("console_public_config") { visibility = [ ":*" ] - include_dirs = [ "${sys_module}/console" ] + include_dirs = [ + "${sys_module}/console", + js_concurrent_module_common, + ] } ohos_shared_library("console") { diff --git a/js_sys_module/console/console.h b/js_sys_module/console/console.h index 91714903..3cb4b558 100644 --- a/js_sys_module/console/console.h +++ b/js_sys_module/console/console.h @@ -19,9 +19,9 @@ #include #include -#include "commonlibrary/ets_utils/js_concurrent_module/common/helper/napi_helper.h" -#include "commonlibrary/ets_utils/js_concurrent_module/common/helper/object_helper.h" -#include "commonlibrary/ets_utils/js_concurrent_module/common/helper/error_helper.h" +#include "helper/napi_helper.h" +#include "helper/object_helper.h" +#include "helper/error_helper.h" #include "napi/native_api.h" #include "napi/native_node_api.h" diff --git a/js_sys_module/timer/BUILD.gn b/js_sys_module/timer/BUILD.gn index c0e2a548..fd021a30 100644 --- a/js_sys_module/timer/BUILD.gn +++ b/js_sys_module/timer/BUILD.gn @@ -14,6 +14,13 @@ import("//build/ohos.gni") import("//commonlibrary/ets_utils/ets_utils_config.gni") +config("timer_public_config") { + include_dirs = [ + "${sys_module}/timer", + js_concurrent_module_common, + ] +} + ohos_shared_library("timer") { branch_protector_ret = "pac_ret" sanitize = { @@ -29,11 +36,13 @@ ohos_shared_library("timer") { sources = [ "../../js_concurrent_module/common/helper/napi_helper.cpp", - "timer.cpp", + "sys_timer.cpp", ] deps = [] + public_configs = [ ":timer_public_config" ] + defines = [] external_deps = [ "napi:ace_napi" ] @@ -85,7 +94,7 @@ ohos_source_set("timer_static") { sources = [ "$js_concurrent_module_common/helper/napi_helper.cpp", - "timer.cpp", + "sys_timer.cpp", ] deps = [] diff --git a/js_sys_module/timer/timer.cpp b/js_sys_module/timer/sys_timer.cpp similarity index 99% rename from js_sys_module/timer/timer.cpp rename to js_sys_module/timer/sys_timer.cpp index 3f379eea..68dbf49f 100755 --- a/js_sys_module/timer/timer.cpp +++ b/js_sys_module/timer/sys_timer.cpp @@ -13,7 +13,7 @@ * limitations under the License. */ -#include "timer.h" +#include "sys_timer.h" #include "native_engine/native_engine.h" #include "tools/log.h" diff --git a/js_sys_module/timer/timer.h b/js_sys_module/timer/sys_timer.h similarity index 94% rename from js_sys_module/timer/timer.h rename to js_sys_module/timer/sys_timer.h index 2353c466..9a9ae441 100644 --- a/js_sys_module/timer/timer.h +++ b/js_sys_module/timer/sys_timer.h @@ -20,8 +20,8 @@ #include #include -#include "commonlibrary/ets_utils/js_concurrent_module/common/helper/napi_helper.h" -#include "commonlibrary/ets_utils/js_concurrent_module/common/helper/object_helper.h" +#include "helper/napi_helper.h" +#include "helper/object_helper.h" #ifdef ENABLE_CONTAINER_SCOPE #include "core/common/container_scope.h" #endif diff --git a/js_sys_module/timer/test/test_timer.cpp b/js_sys_module/timer/test/test_timer.cpp index de2fe73a..66e5bec2 100644 --- a/js_sys_module/timer/test/test_timer.cpp +++ b/js_sys_module/timer/test/test_timer.cpp @@ -18,7 +18,7 @@ #include "napi/native_node_api.h" #include "test.h" #include "test_timer.h" -#include "../timer.h" +#include "../sys_timer.h" #include "tools/log.h" using namespace Commonlibrary::Concurrent::Common; diff --git a/js_sys_module/timer/test/test_timer.h b/js_sys_module/timer/test/test_timer.h index 966006c3..9832ebdc 100644 --- a/js_sys_module/timer/test/test_timer.h +++ b/js_sys_module/timer/test/test_timer.h @@ -17,7 +17,7 @@ #define TEST_TIMER_H #include "commonlibrary/ets_utils/js_concurrent_module/common/helper/napi_helper.h" -#include "../timer.h" +#include "../sys_timer.h" namespace OHOS::JsSysModule { class TimerTest {