From f1aa74d9d1ae3a027cea9b3116a8e78bca6d839e Mon Sep 17 00:00:00 2001 From: jiangzhijun8 Date: Tue, 30 Apr 2024 18:38:56 +0800 Subject: [PATCH] Issue: https://gitee.com/openharmony/ability_ability_base/issues/I9IMHV MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Commit: 元能力子系统各部件改造支持独立编译-独立修改abilit_form_fwk Signed-off-by: jiangzhijun8 --- BUILD.gn | 38 +++++++++++-------- bundle.json | 9 +++-- frameworks/js/napi/BUILD.gn | 26 ++++++------- services/form_render_service/BUILD.gn | 6 +-- .../fms_form_event_util_test/BUILD.gn | 1 + .../fms_form_mgr_adapter_test/BUILD.gn | 1 + .../fms_form_mgr_request_form_test.cpp | 4 +- 7 files changed, 43 insertions(+), 42 deletions(-) diff --git a/BUILD.gn b/BUILD.gn index 5a46fd5a6..aa36daa73 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -32,12 +32,8 @@ ohos_shared_library("libfms") { shlib_type = "sa" version_script = "libfms.map" cflags_cc = [] - include_dirs = [ - "${ability_runtime_path}/services/common/include", - "${ability_runtime_native_path}/appkit/ability_runtime", - "${form_fwk_napi_path}/form_host/form_state_observer/include", - "${init_path}/interfaces/innerkits/include/syspara/", - ] + include_dirs = + [ "${form_fwk_napi_path}/form_host/form_state_observer/include" ] sources = [ "services/config/form_xml_parser.cpp", @@ -114,7 +110,6 @@ ohos_shared_library("libfms") { deps = [ "${form_fwk_path}:form_config", "${form_fwk_path}:form_manager", - "//third_party/libxml2:libxml2", ] external_deps = [ @@ -145,6 +140,7 @@ ohos_shared_library("libfms") { "init:libbegetutil", "ipc:ipc_core", "kv_store:distributeddata_inner", + "libxml2:libxml2", "os_account:os_account_innerkits", "relational_store:native_rdb", "resource_management:global_resmgr", @@ -152,6 +148,10 @@ ohos_shared_library("libfms") { "samgr:samgr_proxy", "time_service:time_client", ] + public_external_deps = [ + "ability_runtime:abilitykit_native", + "ability_runtime:appkit_native", + ] if (cite_memmgr_plugin) { external_deps += [ "memmgr_override:memmgrclient" ] @@ -196,9 +196,7 @@ config("fmskit_config") { config("fmskit_public_config") { include_dirs = [ "interfaces/kits/native/include", - "${ability_runtime_path}/services/common/include", "${form_fwk_path}/interfaces/inner_api/include", - "${bundlefwk_inner_api_path}/appexecfwk_base/include", ] } @@ -225,6 +223,7 @@ ohos_shared_library("fmskit_native") { external_deps = [ "ability_base:want", "ability_runtime:abilitykit_native", + "ability_runtime:abilitykit_native", "c_utils:utils", "eventhandler:libeventhandler", "hilog:libhilog", @@ -233,6 +232,10 @@ ohos_shared_library("fmskit_native") { "napi:ace_napi", "samgr:samgr_proxy", ] + public_external_deps = [ + "ability_runtime:abilitykit_native", + "bundle_framework:appexecfwk_base", + ] subsystem_name = "ability" innerapi_tags = [ "platformsdk" ] @@ -245,11 +248,6 @@ config("formmgr_sdk_config") { include_dirs = [ "interfaces/inner_api/include/", "//third_party/json/include", - "${ability_base_kits_path}/configuration/include", - "${ability_runtime_path}/interfaces/kits/native/ability/native", - "${ability_runtime_innerapi_path}/ability_manager/include", - "${ability_runtime_innerapi_path}/app_manager/include/appmgr", - "${ability_runtime_path}/services/common/include", ] cflags = [] if (target_cpu == "arm") { @@ -258,7 +256,7 @@ config("formmgr_sdk_config") { } ohos_shared_library("form_manager") { - include_dirs = [ "${ability_runtime_innerapi_path}/runtime/include" ] + include_dirs = [] sources = [ "interfaces/inner_api/src/form_ashmem.cpp", @@ -298,17 +296,25 @@ ohos_shared_library("form_manager") { "${form_fwk_path}:formmgr_config", ] - deps = [ "//third_party/jsoncpp:jsoncpp" ] + deps = [] external_deps = [ "ability_base:want", + "ability_runtime:runtime", "bundle_framework:appexecfwk_base", "c_utils:utils", "hilog:libhilog", "ipc:ipc_core", + "jsoncpp:jsoncpp", "napi:ace_napi", "samgr:samgr_proxy", ] + public_external_deps = [ + "ability_base:configuration", + "ability_runtime:ability_context_native", + "ability_runtime:app_manager", + "ability_runtime:mission_info", + ] subsystem_name = "ability" innerapi_tags = [ "platformsdk" ] diff --git a/bundle.json b/bundle.json index d1264d674..b48e75473 100644 --- a/bundle.json +++ b/bundle.json @@ -58,13 +58,14 @@ "memmgr", "init", "resource_schedule_service", - "theme_mgr" + "theme_mgr", + "jsoncpp", + "libxml2" + ], "third_party": [ "node", - "jsoncpp", - "json", - "libxml2" + "json" ] }, "build": { diff --git a/frameworks/js/napi/BUILD.gn b/frameworks/js/napi/BUILD.gn index 518039254..7a0de4ff7 100644 --- a/frameworks/js/napi/BUILD.gn +++ b/frameworks/js/napi/BUILD.gn @@ -22,7 +22,7 @@ config("fmskit_config") { ################################### formbindingdata_napi ######################################## ohos_shared_library("formbindingdata_napi") { - include_dirs = [ "${ipc_core_path}/include" ] + include_dirs = [] sources = [ "form_binding_data/form_binding_data.cpp", @@ -37,6 +37,7 @@ ohos_shared_library("formbindingdata_napi") { "ability_runtime:runtime", "c_utils:utils", "hilog:libhilog", + "ipc:ipc_core", "napi:ace_napi", ] @@ -47,7 +48,7 @@ ohos_shared_library("formbindingdata_napi") { } ohos_shared_library("formbindingdata") { - include_dirs = [ "${ipc_core_path}/include" ] + include_dirs = [] sources = [ "form_binding_data/js_form_binding_data.cpp", @@ -67,6 +68,7 @@ ohos_shared_library("formbindingdata") { "c_utils:utils", "common_event_service:cesfwk_innerkits", "hilog:libhilog", + "ipc:ipc_core", "napi:ace_napi", ] @@ -247,7 +249,7 @@ ohos_shared_library("forminfo") { ################################### formhost_napi ######################################## ohos_shared_library("formhost_napi") { - include_dirs = [ "${ability_runtime_innerapi_path}/runtime/include" ] + include_dirs = [] sources = [ "formHost/napi_form_host.cpp", @@ -282,10 +284,7 @@ ohos_shared_library("formhost_napi") { ################################### formhost ######################################## ohos_shared_library("formhost") { - include_dirs = [ - "${ability_runtime_innerapi_path}/runtime/include", - "${form_fwk_path}/interfaces/inner_api/include", - ] + include_dirs = [ "${form_fwk_path}/interfaces/inner_api/include" ] sources = [ "form_host/js_form_host.cpp", @@ -325,7 +324,6 @@ ohos_shared_library("formhost") { ################################### formobserver ######################################## ohos_shared_library("formobserver") { include_dirs = [ - "${ability_runtime_innerapi_path}/runtime/include", "${form_fwk_path}/interfaces/inner_api/include", "${form_fwk_path}/frameworks/js/napi/form_host", "${form_fwk_path}/frameworks/js/napi/form_observer", @@ -369,7 +367,7 @@ ohos_shared_library("formobserver") { ################################### formprovider_napi ######################################## ohos_shared_library("formprovider_napi") { - include_dirs = [ "${ability_runtime_innerapi_path}/runtime/include" ] + include_dirs = [] sources = [ "formProvider/napi_form_provider.cpp", @@ -403,7 +401,7 @@ ohos_shared_library("formprovider_napi") { } ohos_shared_library("formprovider") { - include_dirs = [ "${ability_runtime_innerapi_path}/runtime/include" ] + include_dirs = [] sources = [ "form_provider/js_form_provider.cpp", @@ -440,7 +438,7 @@ ohos_shared_library("formprovider") { ################################### formagent_napi ######################################## ohos_shared_library("formagent") { - include_dirs = [ "${ability_runtime_innerapi_path}/runtime/include" ] + include_dirs = [] sources = [ "form_agent/js_form_agent.cpp", @@ -508,10 +506,7 @@ ohos_shared_library("formutil_napi") { ################################### formerror_napi ######################################## ohos_shared_library("formerror_napi") { - include_dirs = [ - "${ability_runtime_innerapi_path}/runtime/include", - "${form_fwk_napi_path}/formUtil", - ] + include_dirs = [ "${form_fwk_napi_path}/formUtil" ] sources = [ "form_error/form_error_module.cpp", @@ -522,6 +517,7 @@ ohos_shared_library("formerror_napi") { external_deps = [ "ability_runtime:abilitykit_native", + "ability_runtime:runtime", "common_event_service:cesfwk_innerkits", "hilog:libhilog", "napi:ace_napi", diff --git a/services/form_render_service/BUILD.gn b/services/form_render_service/BUILD.gn index 309f6b903..af8f6d3ad 100644 --- a/services/form_render_service/BUILD.gn +++ b/services/form_render_service/BUILD.gn @@ -13,15 +13,11 @@ import("//build/ohos.gni") import("//build/ohos/app/app.gni") -import("//foundation/ability/ability_runtime/ability_runtime.gni") import("//foundation/ability/form_fwk/form_fwk.gni") config("formrender_config") { visibility = [ ":*" ] - include_dirs = [ - "${arkui_ace_engine_components_path}/form/resource/", - "include", - ] + include_dirs = [ "include" ] cflags = [] if (target_cpu == "arm") { cflags += [ "-DBINDER_IPC_32BIT" ] diff --git a/test/unittest/fms_form_event_util_test/BUILD.gn b/test/unittest/fms_form_event_util_test/BUILD.gn index 32222d38a..e1f55d738 100755 --- a/test/unittest/fms_form_event_util_test/BUILD.gn +++ b/test/unittest/fms_form_event_util_test/BUILD.gn @@ -64,6 +64,7 @@ ohos_unittest("FmsFormEventUtilTest") { "ffrt:libffrt", "form_fwk:form_manager", "hilog:libhilog", + "image_framework:image_native", "ipc:ipc_core", "kv_store:distributeddata_inner", "relational_store:native_rdb", diff --git a/test/unittest/fms_form_mgr_adapter_test/BUILD.gn b/test/unittest/fms_form_mgr_adapter_test/BUILD.gn index 3ab90eead..2d9077d52 100755 --- a/test/unittest/fms_form_mgr_adapter_test/BUILD.gn +++ b/test/unittest/fms_form_mgr_adapter_test/BUILD.gn @@ -71,6 +71,7 @@ ohos_unittest("FmsFormMgrAdapterTest") { "ffrt:libffrt", "form_fwk:form_manager", "hilog:libhilog", + "image_framework:image_native", "ipc:ipc_core", "kv_store:distributeddata_inner", "relational_store:native_rdb", diff --git a/test/unittest/fms_form_mgr_request_form_test/fms_form_mgr_request_form_test.cpp b/test/unittest/fms_form_mgr_request_form_test/fms_form_mgr_request_form_test.cpp index e1eddd080..80e01a7e7 100644 --- a/test/unittest/fms_form_mgr_request_form_test/fms_form_mgr_request_form_test.cpp +++ b/test/unittest/fms_form_mgr_request_form_test/fms_form_mgr_request_form_test.cpp @@ -34,8 +34,8 @@ #include "mock_bundle_manager.h" #include "mock_ability_manager.h" #include "system_ability_definition.h" -#include "../../mock/include/mock_form_token.h" -#include "../../mock/include/mock_form_host_client.h" +#include "foundation/ability/form_fwk/test/mock/include/mock_form_token.h" +#include "foundation/ability/form_fwk/test/mock/include/mock_form_host_client.h" using namespace testing::ext; using namespace OHOS; -- Gitee