diff --git a/frameworks/simulator/ability_simulator/BUILD.gn b/frameworks/simulator/ability_simulator/BUILD.gn index 0671f9f18f..5d5f379eab 100644 --- a/frameworks/simulator/ability_simulator/BUILD.gn +++ b/frameworks/simulator/ability_simulator/BUILD.gn @@ -68,7 +68,6 @@ ohos_shared_library("ability_simulator_inner") { "${windowmanager_path}/interfaces/innerkits/wm", "${windowmanager_path}/interfaces/kits/napi/window_runtime/window_stage_napi", "include/bundle_parser", - "//third_party/json/include", ] sources = [ @@ -113,6 +112,7 @@ ohos_shared_library("ability_simulator_inner") { "ets_utils:console", "ets_utils:timer", "hilog:libhilog", + "json:nlohmann_json_static", "jsoncpp:jsoncpp_static", "napi:ace_napi", ] diff --git a/test/moduletest/ability_test/BUILD.gn b/test/moduletest/ability_test/BUILD.gn index 2b1cb7c2a5..18f014593a 100644 --- a/test/moduletest/ability_test/BUILD.gn +++ b/test/moduletest/ability_test/BUILD.gn @@ -24,7 +24,6 @@ config("module_private_config") { cflags += [ "-DBINDER_IPC_32BIT" ] } include_dirs = [ - "//third_party/json/include", "${ability_runtime_innerkits_path}/ability_manager/include", "${distributedschedule_path}/samgr/interfaces/innerkits/samgr_proxy/include", "${ability_runtime_services_path}/common/include", @@ -83,6 +82,7 @@ ohos_moduletest("ability_moduletest") { "hilog:libhilog", "init:libbegetutil", "ipc:ipc_core", + "json:nlohmann_json_static", "napi:ace_napi", "relational_store:native_appdatafwk", "relational_store:native_dataability", @@ -142,6 +142,7 @@ ohos_moduletest("ability_conetxt_test") { "hilog:libhilog", "init:libbegetutil", "ipc:ipc_core", + "json:nlohmann_json_static", "napi:ace_napi", "relational_store:native_appdatafwk", "relational_store:native_dataability", @@ -180,6 +181,7 @@ ohos_moduletest("ability_thread_call_request_module_test") { "common_event_service:cesfwk_innerkits", "eventhandler:libeventhandler", "hilog:libhilog", + "json:nlohmann_json_static", "napi:ace_napi", ] } @@ -224,6 +226,7 @@ ohos_moduletest("data_ability_operation_moduletest") { "c_utils:utils", "hilog:libhilog", "ipc:ipc_core", + "json:nlohmann_json_static", "napi:ace_napi", "relational_store:native_appdatafwk", "relational_store:native_dataability", @@ -279,6 +282,7 @@ ohos_moduletest("data_ability_helper_module_test") { "eventhandler:libeventhandler", "hilog:libhilog", "ipc:ipc_core", + "json:nlohmann_json_static", "napi:ace_napi", "relational_store:native_appdatafwk", "relational_store:native_dataability", @@ -326,6 +330,7 @@ ohos_moduletest("ability_post_event_timeout_test") { "eventhandler:libeventhandler", "hilog:libhilog", "ipc:ipc_core", + "json:nlohmann_json_static", "napi:ace_napi", "relational_store:native_appdatafwk", "relational_store:native_dataability", diff --git a/test/moduletest/common/ams/BUILD.gn b/test/moduletest/common/ams/BUILD.gn index 7c2c4c6f93..1936399484 100644 --- a/test/moduletest/common/ams/BUILD.gn +++ b/test/moduletest/common/ams/BUILD.gn @@ -24,10 +24,8 @@ ohos_source_set("appmgr_mst_source") { defines = [ "AMS_LOG_TAG = \"AppMgrService\"" ] - include_dirs = [ - "//third_party/json/include", - "${ability_runtime_test_path}/mock/services_appmgr_test/include", - ] + include_dirs = + [ "${ability_runtime_test_path}/mock/services_appmgr_test/include" ] public_configs = [ "${ability_runtime_test_path}/moduletest:services_module_test_config", @@ -80,6 +78,7 @@ ohos_source_set("appmgr_mst_source") { "init:libbeget_proxy", "init:libbegetutil", "ipc:ipc_core", + "json:nlohmann_json_static", ] if (ability_runtime_graphics) { diff --git a/test/unittest/BUILD.gn b/test/unittest/BUILD.gn index 6dd7482377..afc3662ad6 100644 --- a/test/unittest/BUILD.gn +++ b/test/unittest/BUILD.gn @@ -57,8 +57,6 @@ ohos_source_set("appmgr_test_source") { "${ability_runtime_innerkits_path}/app_manager/src/appmgr/running_process_info.cpp", ] - include_dirs = [ "//third_party/json/include" ] - public_configs = [ ":appmgr_test_config", "${c_utils_base_path}:utils_config", @@ -94,6 +92,7 @@ ohos_source_set("appmgr_test_source") { "hilog:libhilog", "hitrace:hitrace_meter", "ipc:ipc_core", + "json:nlohmann_json_static", "kv_store:distributeddata_mgr", ] diff --git a/test/unittest/ams_app_state_callback_test/BUILD.gn b/test/unittest/ams_app_state_callback_test/BUILD.gn index 29555e5242..96cf099b43 100644 --- a/test/unittest/ams_app_state_callback_test/BUILD.gn +++ b/test/unittest/ams_app_state_callback_test/BUILD.gn @@ -19,7 +19,6 @@ module_output_path = "ability_runtime/appmgrservice" ohos_unittest("AmsAppStateCallbackTest") { module_out_path = module_output_path cflags_cc = [] - include_dirs = [ "//third_party/json/include" ] sources = [ "${ability_runtime_innerkits_path}//app_manager/src/appmgr/app_process_data.cpp", @@ -49,6 +48,7 @@ ohos_unittest("AmsAppStateCallbackTest") { "hilog:libhilog", "hitrace:hitrace_meter", "ipc:ipc_core", + "json:nlohmann_json_static", ] } diff --git a/test/unittest/dfr_test/appfreeze_inner_test/BUILD.gn b/test/unittest/dfr_test/appfreeze_inner_test/BUILD.gn index f9cc437dd8..d4818c5bbd 100644 --- a/test/unittest/dfr_test/appfreeze_inner_test/BUILD.gn +++ b/test/unittest/dfr_test/appfreeze_inner_test/BUILD.gn @@ -50,7 +50,6 @@ ohos_unittest("appfreeze_inner_test") { include_dirs = [ "${ability_runtime_path}/interfaces/kits/native/appkit/dfr", "${ability_runtime_path}/utils/global/time/include", - "//third_party/json/include", ] configs = [ @@ -104,6 +103,7 @@ ohos_unittest("appfreeze_inner_test") { "init:libbegetutil", "input:libmmi-client", "ipc:ipc_core", + "json:nlohmann_json_static", "napi:ace_napi", "resource_management:global_resmgr", "safwk:system_ability_fwk", diff --git a/test/unittest/dfr_test/appfreeze_manager_test/BUILD.gn b/test/unittest/dfr_test/appfreeze_manager_test/BUILD.gn index e0452c3154..ca35c2db20 100644 --- a/test/unittest/dfr_test/appfreeze_manager_test/BUILD.gn +++ b/test/unittest/dfr_test/appfreeze_manager_test/BUILD.gn @@ -9,7 +9,7 @@ # 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. +# limitations under the License. import("//build/ohos.gni") import("//build/test.gni") @@ -52,7 +52,6 @@ ohos_unittest("appfreeze_manager_test") { "${ability_runtime_services_path}/appdfr/include", "${ability_runtime_services_path}/appmgr/include", "${ability_runtime_services_path}/common/include", - "//third_party/json/include", ] configs = [ @@ -87,10 +86,11 @@ ohos_unittest("appfreeze_manager_test") { "hilog:libhilog", "init:libbeget_proxy", "ipc:ipc_core", + "json:nlohmann_json_static", ] } -############################################################################### +############################################################################### group("unittest") { testonly = true diff --git a/test/unittest/dfr_test/appfreeze_state_test/BUILD.gn b/test/unittest/dfr_test/appfreeze_state_test/BUILD.gn index 57c1669ea6..422a69dcb9 100644 --- a/test/unittest/dfr_test/appfreeze_state_test/BUILD.gn +++ b/test/unittest/dfr_test/appfreeze_state_test/BUILD.gn @@ -50,7 +50,6 @@ ohos_unittest("appfreeze_state_test") { include_dirs = [ "${ability_runtime_path}/interfaces/kits/native/appkit/dfr", "${ability_runtime_path}/utils/global/time/include", - "//third_party/json/include", ] configs = [ @@ -101,6 +100,7 @@ ohos_unittest("appfreeze_state_test") { "hitrace:hitrace_meter", "init:libbegetutil", "ipc:ipc_core", + "json:nlohmann_json_static", "napi:ace_napi", ] } diff --git a/test/unittest/dfr_test/watchdog_test/BUILD.gn b/test/unittest/dfr_test/watchdog_test/BUILD.gn index 1825d44c40..0c9afbb19d 100644 --- a/test/unittest/dfr_test/watchdog_test/BUILD.gn +++ b/test/unittest/dfr_test/watchdog_test/BUILD.gn @@ -52,7 +52,6 @@ ohos_unittest("watchdog_test") { "${ability_runtime_path}/interfaces/kits/native/appkit/dfr", "${ability_runtime_test_path}/mock/frameworks_kits_appkit_test/include", "${ability_runtime_path}/interfaces/kits/native/appkit/ability_runtime/app", - "//third_party/json/include", ] configs = [ @@ -80,6 +79,7 @@ ohos_unittest("watchdog_test") { "hilog:libhilog", "image_framework:image_native", "ipc:ipc_core", + "json:nlohmann_json_static", "napi:ace_napi", ] } diff --git a/test/unittest/js_auto_fill_extension_test/BUILD.gn b/test/unittest/js_auto_fill_extension_test/BUILD.gn index 11e750bfd5..6a919c7e81 100644 --- a/test/unittest/js_auto_fill_extension_test/BUILD.gn +++ b/test/unittest/js_auto_fill_extension_test/BUILD.gn @@ -28,7 +28,6 @@ ohos_unittest("js_auto_fill_extension_test") { "${ability_runtime_path}/interfaces/kits/native/appkit/app", "${ability_runtime_test_path}/mock/frameworks_kits_ability_native_test/include", "//third_party/jsoncpp/include", - "//third_party/json/include", ] sources = [ "js_auto_fill_extension_test.cpp" ] @@ -62,6 +61,7 @@ ohos_unittest("js_auto_fill_extension_test") { "i18n:intl_util", "init:libbegetutil", "ipc:ipc_core", + "json:nlohmann_json_static", "napi:ace_napi", "resource_management:global_resmgr", ] diff --git a/test/unittest/js_service_extension_test/BUILD.gn b/test/unittest/js_service_extension_test/BUILD.gn index e69761f716..202ea65685 100644 --- a/test/unittest/js_service_extension_test/BUILD.gn +++ b/test/unittest/js_service_extension_test/BUILD.gn @@ -27,7 +27,6 @@ ohos_unittest("js_service_extension_test") { "${ability_runtime_path}/interfaces/kits/native/appkit/app", "${ability_runtime_test_path}/mock/frameworks_kits_ability_native_test/include", "//third_party/jsoncpp/include", - "//third_party/json/include", ] sources = [ @@ -63,6 +62,7 @@ ohos_unittest("js_service_extension_test") { "i18n:intl_util", "init:libbegetutil", "ipc:ipc_core", + "json:nlohmann_json_static", "napi:ace_napi", "resource_management:global_resmgr", ]