From 9fbd7eb30f9a3a9f67f449cbcecbdf94c91675d0 Mon Sep 17 00:00:00 2001 From: Tianshi Liu Date: Wed, 19 Jan 2022 18:54:32 +0800 Subject: [PATCH] update code Signed-off-by: Tianshi Liu Change-Id: I7bc544ca6fd052989f8f87e1a5f51fdaf924e32e --- interfaces/innerkits/napi/BUILD.gn | 26 +++++++++++--------------- interfaces/innerkits/native/BUILD.gn | 10 +++++----- interfaces/kits/napi/BUILD.gn | 26 ++++++++++---------------- sa_profile/{922.xml => 921.xml} | 2 +- sa_profile/BUILD.gn | 4 ++-- services/BUILD.gn | 20 ++++++++++---------- test/unittest/BUILD.gn | 9 +++++---- 7 files changed, 44 insertions(+), 53 deletions(-) rename sa_profile/{922.xml => 921.xml} (97%) diff --git a/interfaces/innerkits/napi/BUILD.gn b/interfaces/innerkits/napi/BUILD.gn index 32e92deec..d41f5f669 100755 --- a/interfaces/innerkits/napi/BUILD.gn +++ b/interfaces/innerkits/napi/BUILD.gn @@ -11,13 +11,11 @@ # See the License for the specific language governing permissions and # limitations under the License. -import("//build/ohos.gni") import("//base/user_iam/user_auth/userauth.gni") +import("//build/ohos.gni") config("userauth_public_config") { - include_dirs = [ - "include" - ] + include_dirs = [ "include" ] } ohos_shared_library("userauth") { @@ -27,23 +25,21 @@ ohos_shared_library("userauth") { ] sources = [ - "src/auth_native_module.cpp", - "src/user_auth_impl.cpp", - "src/auth_build.cpp", - "src/result_convert.cpp", - "src/user_auth_helper.cpp", - "src/authapi_callback.cpp", + "src/auth_build.cpp", + "src/auth_native_module.cpp", + "src/authapi_callback.cpp", + "src/result_convert.cpp", + "src/user_auth_helper.cpp", + "src/user_auth_impl.cpp", ] deps = [ - "//utils/native/base:utils", "${userauth_innerkits_path}/native:userauth_framework", - "//foundation/ace/napi:ace_napi" + "//foundation/ace/napi:ace_napi", + "//utils/native/base:utils", ] - configs = [ - "${userauth_utils_path}:utils_config", - ] + configs = [ "${userauth_utils_path}:utils_config" ] public_configs = [ ":userauth_public_config" ] diff --git a/interfaces/innerkits/native/BUILD.gn b/interfaces/innerkits/native/BUILD.gn index cdcbcfeb0..e07ff2c54 100755 --- a/interfaces/innerkits/native/BUILD.gn +++ b/interfaces/innerkits/native/BUILD.gn @@ -15,7 +15,7 @@ import("//base/user_iam/user_auth/userauth.gni") config("userauth_private_config") { include_dirs = [ - "//utils/system/safwk/native/include", + "//foundation/distributedschedule/samgr/interfaces/innerkits/samgr_proxy/include", "//foundation/distributeddatamgr/distributeddatamgr/frameworks/innerkitsimpl/distributeddatafwk/include", ] } @@ -26,22 +26,22 @@ config("userauth_public_config") { ohos_shared_library("userauth_framework") { sources = [ - "../../../frameworks/kitsimpl/src/userauth_proxy.cpp", "../../../frameworks/kitsimpl/src/userauth.cpp", "../../../frameworks/kitsimpl/src/userauth_async_stub.cpp", + "../../../frameworks/kitsimpl/src/userauth_proxy.cpp", ] configs = [ "${userauth_utils_path}:utils_config", - ":userauth_private_config" + ":userauth_private_config", ] public_configs = [ ":userauth_public_config" ] deps = [ - "//utils/native/base:utils", "//base/user_iam/auth_executor_mgr/interfaces/innerkits:coauth_framework", - ] + "//utils/native/base:utils", + ] external_deps = [ "hiviewdfx_hilog_native:libhilog", diff --git a/interfaces/kits/napi/BUILD.gn b/interfaces/kits/napi/BUILD.gn index bcec5cfe2..a84551cd3 100755 --- a/interfaces/kits/napi/BUILD.gn +++ b/interfaces/kits/napi/BUILD.gn @@ -11,40 +11,34 @@ # See the License for the specific language governing permissions and # limitations under the License. -import("//build/ohos.gni") import("//base/user_iam/user_auth/userauth.gni") import("//build/lite/config/component/lite_component.gni") +import("//build/ohos.gni") ## Build userauth.so {{{ config("userauth_public_config") { - visibility = [ ":*" ] - include_dirs = [ - "include" - ] - cflags = [ ] + visibility = [ ":*" ] + include_dirs = [ "include" ] + cflags = [] } ohos_shared_library("userauthnorth") { sources = [ - "src/auth_native_module.cpp", - "src/user_auth_helper_north.cpp", + "src/auth_native_module.cpp", + "src/user_auth_helper_north.cpp", ] - include_dirs=[ - "third_party/node/src" - ] + include_dirs = [ "third_party/node/src" ] deps = [ - "//foundation/ace/napi:ace_napi", + "${userauth_innerkits_path}/native:userauth_framework", "//base/user_iam/user_auth/interfaces/innerkits/napi:userauth", - "${userauth_innerkits_path}/native:userauth_framework" + "//foundation/ace/napi:ace_napi", ] public_configs = [ ":userauth_public_config" ] - external_deps = [ - "ipc:ipc_core", - ] + external_deps = [ "ipc:ipc_core" ] if (is_standard_system) { external_deps += [ "hiviewdfx_hilog_native:libhilog" ] } else { diff --git a/sa_profile/922.xml b/sa_profile/921.xml similarity index 97% rename from sa_profile/922.xml rename to sa_profile/921.xml index 57f9f8e67..7e4b64a5b 100644 --- a/sa_profile/922.xml +++ b/sa_profile/921.xml @@ -15,7 +15,7 @@ useriam - 922 + 921 libuserauthservice.z.so true false diff --git a/sa_profile/BUILD.gn b/sa_profile/BUILD.gn index 363274a1c..3123dc98f 100644 --- a/sa_profile/BUILD.gn +++ b/sa_profile/BUILD.gn @@ -12,10 +12,10 @@ # limitations under the License. import("//base/user_iam/user_auth/userauth.gni") -import("//build/ohos/sa_profile/sa_profile.gni") import("//build/ohos.gni") +import("//build/ohos/sa_profile/sa_profile.gni") ohos_sa_profile("userauth_sa_profile") { - sources = [ "922.xml" ] + sources = [ "921.xml" ] part_name = "${userauth_native_part_name}" } diff --git a/services/BUILD.gn b/services/BUILD.gn index 2e3e582fd..db18f921d 100755 --- a/services/BUILD.gn +++ b/services/BUILD.gn @@ -17,20 +17,20 @@ config("userauth_private_config") { include_dirs = [ "include", "//base/user_iam/auth_executor_mgr/common/interface", - "//utils/system/safwk/native/include", + "//foundation/distributedschedule/samgr/interfaces/innerkits/samgr_proxy/include", ] } ohos_shared_library("userauthservice") { sources = [ - "src/userauth_service.cpp", + "src/context_thread_pool.cpp", "src/userauth_adapter.cpp", - "src/userauth_controller.cpp", - "src/userauth_stub.cpp", - "src/userauth_excallback_impl.cpp", "src/userauth_async_proxy.cpp", + "src/userauth_controller.cpp", "src/userauth_datamgr.cpp", - "src/context_thread_pool.cpp", + "src/userauth_excallback_impl.cpp", + "src/userauth_service.cpp", + "src/userauth_stub.cpp", ] configs = [ @@ -39,14 +39,14 @@ ohos_shared_library("userauthservice") { ] deps = [ + "${userauth_innerkits_path}/native:userauth_framework", + "//base/startup/syspara_lite/interfaces/innerkits/native/syspara:syspara", + "//base/user_iam/auth_executor_mgr/common:useriam_common_lib", "//base/user_iam/auth_executor_mgr/interfaces/innerkits:coauth_framework", "//base/user_iam/user_idm/interfaces/innerkits:useridm_framework", - "//third_party/openssl:libcrypto_static", - "${userauth_innerkits_path}/native:userauth_framework", "//drivers/peripheral/display/hal:hdi_display_device", + "//third_party/openssl:libcrypto_static", "//utils/native/base:utils", - "//base/startup/syspara_lite/interfaces/innerkits/native/syspara:syspara", - "//base/user_iam/auth_executor_mgr/common:useriam_common_lib", ] external_deps = [ diff --git a/test/unittest/BUILD.gn b/test/unittest/BUILD.gn index c5d5a54ef..28cdb28e0 100644 --- a/test/unittest/BUILD.gn +++ b/test/unittest/BUILD.gn @@ -10,10 +10,9 @@ # 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("//base/user_iam/user_auth/userauth.gni") import("//build/ohos.gni") import("//build/test.gni") -import("//base/user_iam/user_auth/userauth.gni") - module_output_path = "${userauth_native_part_name}/UserAuth_test" @@ -23,7 +22,7 @@ config("module_private_config") { include_dirs = [ "include", - "//utils/system/safwk/native/include", + "//foundation/distributedschedule/samgr/interfaces/innerkits/samgr_proxy/include", ] } @@ -33,11 +32,13 @@ ohos_unittest("unittest_test") { sources = [ "src/userauth_test.cpp" ] - include_dirs = [ + include_dirs = [ "include", + #"//base/user_iam/user_idm/unittest/include", "//out/hi3516dv300/innerkits/ohos-arm/ipc/ipc_single/include", "//base/user_iam/user_auth/interfaces/innerkits/include", + #"//base/user_iam/user_idm/services/include", ] -- Gitee