Signed-off-by: lwk <1076278852@qq.com>
This commit is contained in:
lwk 2022-03-12 16:24:29 +08:00
parent 94ccbd42a8
commit fe281f68c5
16 changed files with 138 additions and 54 deletions

View File

@ -14,7 +14,9 @@
limitations under the License.
This is the configuration file template for OpenHarmony OSS Audit Tool, please copy it to your project root dir and modify it refer to OpenHarmony/tools_oat/README.
-->
<configuration>
<oatconfig>
<filefilterlist>

View File

@ -40,12 +40,12 @@
## 相关仓
[useriam_auth_executor_mgr](https://gitee.com/openharmony-sig/useriam_coauth)
[useriam_auth_executor_mgr](https://gitee.com/openharmony/useriam_auth_executor_mgr)
[useriam_user_idm](https://gitee.com/openharmony-sig/useriam_useridm)
[useriam_user_idm](https://gitee.com/openharmony/useriam_useridm)
[useriam_user_auth](https://gitee.com/openharmony-sig/useriam_userauth)
[useriam_user_auth](https://gitee.com/openharmony/useriam_userauth)
[useriam_pin_auth](https://gitee.com/openharmony-sig/useriam_pinauth)
[useriam_pin_auth](https://gitee.com/openharmony/useriam_pin_auth)
**[useriam_faceauth](https://gitee.com/openharmony/useriam_faceauth)**

View File

@ -16,7 +16,6 @@ import("//build/ohos/sa_profile/sa_profile.gni")
ohos_sa_profile("face_auth_sa_profile") {
sources = [ "942.xml" ]
part_name = "faceauth"
}

View File

@ -44,7 +44,7 @@ bool CheckBufferWithSize(const Buffer *buffer, const uint32_t size)
Buffer *CreateBuffer(const uint32_t size)
{
if ((size == 0) || (size > MAX_BUFFER_SIZE)) {
FACEAUTH_HILOGE(MODULE_SERVICE, "Bad param size:%zu", size);
FACEAUTH_HILOGE(MODULE_SERVICE, "Bad param size:%u", size);
return nullptr;
}
@ -108,19 +108,19 @@ Buffer *CopyBuffer(const Buffer *buffer)
{
if (!IsBufferValid(buffer)) {
FACEAUTH_HILOGE(MODULE_SERVICE, "Invalid buffer");
return NULL;
return nullptr;
}
Buffer *copyBuffer = CreateBuffer(buffer->maxSize);
if (copyBuffer == NULL) {
if (copyBuffer == nullptr) {
FACEAUTH_HILOGE(MODULE_SERVICE, "Invalid buffer");
return NULL;
return nullptr;
}
if (memcpy_s(copyBuffer->buf, copyBuffer->maxSize, buffer->buf, buffer->contentSize) != EOK) {
FACEAUTH_HILOGE(MODULE_SERVICE, "Copy buffer fail");
DestoryBuffer(copyBuffer);
return NULL;
return nullptr;
}
copyBuffer->contentSize = buffer->contentSize;

View File

@ -31,7 +31,7 @@ std::shared_ptr<FaceAuthCamera> FaceAuthCamera::GetInstance()
std::lock_guard<std::mutex> lock_l(mutex_);
if (instance_ == nullptr) {
instance_ = std::make_shared<FaceAuthCamera>();
}
}
}
return instance_;
}

View File

@ -51,7 +51,7 @@ void FaceAuthCameraBufferListener::OnBufferAvailable()
SendCameraImage(buffer, timestamp);
cameraBuffer_->ReleaseBuffer(buffer, -1);
} else {
FACEAUTH_HILOGI(MODULE_SERVICE, "AcquireBuffer failed!");
FACEAUTH_HILOGE(MODULE_SERVICE, "AcquireBuffer failed!");
}
}
} // namespace FaceAuth

View File

@ -39,7 +39,7 @@ std::shared_ptr<FaceAuthEvent> FaceAuthEvent::GetInstance()
std::lock_guard<std::mutex> lock_l(mutex_);
if (instance_ == nullptr) {
instance_ = std::make_shared<FaceAuthEvent>();
}
}
}
return instance_;
}
@ -68,7 +68,7 @@ void FaceAuthEvent::HandleTask(const AppExecFwk::InnerEvent::Pointer &event)
break;
}
default: {
FACEAUTH_HILOGI(MODULE_SERVICE, "operateType is invalid, %{public}d", operateType);
FACEAUTH_HILOGE(MODULE_SERVICE, "operateType is invalid, %{public}d", operateType);
break;
}
}

View File

@ -35,7 +35,7 @@ int32_t FaceAuthExecutorCallback::OnBeginExecute(uint64_t scheduleId, std::vecto
// get command
uint32_t command = 0;
commandAttrs->GetUint32Value(AUTH_SCHEDULE_MODE, command);
FACEAUTH_HILOGI(MODULE_SERVICE, "command = %{public}u.", command);
FACEAUTH_HILOGD(MODULE_SERVICE, "command = %{public}u.", command);
// get templateID
uint64_t templateId = 0;
commandAttrs->GetUint64Value(AUTH_TEMPLATE_ID, templateId);
@ -55,7 +55,7 @@ int32_t FaceAuthExecutorCallback::OnBeginExecute(uint64_t scheduleId, std::vecto
break;
}
default:
FACEAUTH_HILOGI(MODULE_SERVICE, "other command.command = %u", command);
FACEAUTH_HILOGE(MODULE_SERVICE, "other command.command = %u", command);
break;
}
return FA_RET_OK;
@ -72,7 +72,7 @@ int32_t FaceAuthExecutorCallback::OnEndExecute(uint64_t scheduleId, pAuthAttribu
uint32_t command = 0;
int32_t ret = FA_RET_OK;
consumerAttr->GetUint32Value(AUTH_SCHEDULE_MODE, command);
FACEAUTH_HILOGI(MODULE_SERVICE, "command = %{public}u.", command);
FACEAUTH_HILOGD(MODULE_SERVICE, "command = %{public}u.", command);
switch (command) {
case FACE_COMMAND_CANCEL_ENROLL: {
EnrollParam data = {};
@ -93,7 +93,7 @@ int32_t FaceAuthExecutorCallback::OnEndExecute(uint64_t scheduleId, pAuthAttribu
break;
}
default:
FACEAUTH_HILOGI(MODULE_SERVICE, "other command.command = %u", command);
FACEAUTH_HILOGE(MODULE_SERVICE, "other command.command = %u", command);
break;
}
return ret;
@ -104,7 +104,7 @@ void FaceAuthExecutorCallback::OnMessengerReady(const sptr<AuthResPool::IExecuto
FACEAUTH_HILOGI(MODULE_SERVICE, "%{public}s run.", __PRETTY_FUNCTION__);
std::shared_ptr<FaceAuthManager> manager = FaceAuthManager::GetInstance();
if (manager == nullptr) {
FACEAUTH_HILOGI(MODULE_SERVICE, "manager instance is null.");
FACEAUTH_HILOGE(MODULE_SERVICE, "manager instance is null.");
return;
}
manager->SetExecutorMessenger(messenger);
@ -122,7 +122,7 @@ int32_t FaceAuthExecutorCallback::OnSetProperty(pAuthAttributes properties)
// get command
uint32_t command = 0;
properties->GetUint32Value(AUTH_PROPERTY_MODE, command);
FACEAUTH_HILOGI(MODULE_SERVICE, "command = %{public}u.", command);
FACEAUTH_HILOGD(MODULE_SERVICE, "command = %{public}u.", command);
// get scheduleID
uint64_t scheduleID = 0;
properties->GetUint64Value(AUTH_SESSION_ID, scheduleID);
@ -156,7 +156,7 @@ int32_t FaceAuthExecutorCallback::OnSetProperty(pAuthAttributes properties)
manager->ReleaseAlgorithm(bundleName);
break;
default:
FACEAUTH_HILOGI(MODULE_SERVICE, "other command.command = %u", command);
FACEAUTH_HILOGE(MODULE_SERVICE, "other command.command = %u", command);
break;
}
return FA_RET_OK;

View File

@ -87,7 +87,7 @@ int32_t FaceAuthManager::Init()
FACEAUTH_HILOGE(MODULE_SERVICE, "Init CA failed.");
return FA_RET_ERROR;
}
FACEAUTH_HILOGE(MODULE_SERVICE, "FaceAuthManager::Init Success.");
FACEAUTH_HILOGI(MODULE_SERVICE, "FaceAuthManager::Init Success.");
// check register state
std::thread checkThread(OHOS::UserIAM::FaceAuth::CheckSystemAbility);
checkThread.join();
@ -101,7 +101,7 @@ void CheckSystemAbility()
const int SLEEP_TIME = 1;
sptr<ISystemAbilityManager> sam = SystemAbilityManagerClient::GetInstance().GetSystemAbilityManager();
if (sam == nullptr) {
FACEAUTH_HILOGI(MODULE_SERVICE, "Failed to get system ability manager");
FACEAUTH_HILOGE(MODULE_SERVICE, "Failed to get system ability manager");
return;
}
for (int i = 0; i < CHECK_TIMES; i++) {
@ -119,7 +119,7 @@ void CheckSystemAbility()
FACEAUTH_HILOGI(MODULE_SERVICE, "end sleep");
}
}
FACEAUTH_HILOGI(MODULE_SERVICE, "start AUTHEXECUTORMGR ability all failed");
FACEAUTH_HILOGE(MODULE_SERVICE, "start AUTHEXECUTORMGR ability all failed");
}
void FaceAuthManager::QueryRegStatus()
@ -149,6 +149,7 @@ void FaceAuthManager::QueryRegStatus()
}
AuthResPool::AuthExecutorRegistry::GetInstance().QueryStatus(*executorInfo, queryCallback_);
}
void FaceAuthManager::RegisterExecutor()
{
FACEAUTH_HILOGI(MODULE_SERVICE, "%{public}s run.", __PRETTY_FUNCTION__);
@ -217,11 +218,11 @@ int32_t FaceAuthManager::Release()
int32_t FaceAuthManager::AddAuthenticationRequest(const AuthParam &param)
{
FACEAUTH_HILOGI(MODULE_SERVICE, "%{public}s run.", __PRETTY_FUNCTION__);
FACEAUTH_HILOGI(MODULE_SERVICE, "[DoAuth]scheduleID = %{public}llu.", param.scheduleID);
FACEAUTH_HILOGI(MODULE_SERVICE, "[DoAuth]templateID = %{public}llu.", param.templateID);
FACEAUTH_HILOGD(MODULE_SERVICE, "[DoAuth]scheduleID = %{public}llu.", param.scheduleID);
FACEAUTH_HILOGD(MODULE_SERVICE, "[DoAuth]templateID = %{public}llu.", param.templateID);
// check param
if (param.templateID < 0) {
FACEAUTH_HILOGI(MODULE_SERVICE, "Parameter check error.");
FACEAUTH_HILOGE(MODULE_SERVICE, "Parameter check error.");
return FA_RET_ERROR;
}
// check req info list is full
@ -229,14 +230,14 @@ int32_t FaceAuthManager::AddAuthenticationRequest(const AuthParam &param)
reqType.reqId = param.scheduleID;
reqType.operateType = FACE_OPERATE_TYPE_LOCAL_AUTH;
if (FaceAuthReq::GetInstance()->IsReqNumReachedMax(FACE_OPERATE_TYPE_LOCAL_AUTH)) {
FACEAUTH_HILOGI(MODULE_SERVICE, "Auth is Max.");
FACEAUTH_HILOGE(MODULE_SERVICE, "Auth is Max.");
return FA_RET_ERROR;
}
// send event
FaceInfo faceInfo = {};
faceInfo.eventId = GenerateEventId();
if (faceInfo.eventId == INVALID_EVENT_ID) {
FACEAUTH_HILOGI(MODULE_SERVICE, "faceInfo.eventId is invalid.");
FACEAUTH_HILOGE(MODULE_SERVICE, "faceInfo.eventId is invalid.");
return FA_RET_ERROR;
}
faceInfo.uId = param.callerUID;
@ -246,18 +247,19 @@ int32_t FaceAuthManager::AddAuthenticationRequest(const AuthParam &param)
handler_->SendEvent(faceInfo.eventId, std::move(authInfo), priority);
return FA_RET_OK;
}
void FaceAuthManager::DoAuthenticate(const AuthParam &param)
{
// check param
if (param.templateID < 0) {
FACEAUTH_HILOGI(MODULE_SERVICE, "Parameter check error.");
FACEAUTH_HILOGE(MODULE_SERVICE, "Parameter check error.");
return;
}
this->InitAlgorithm(FACE_LOCAL_INIT_ALGO_NAME);
// open camera and send image to algorithm
if (OpenCamera() != FA_RET_OK) {
// RK3568 no support camera, temporary ignore error
FACEAUTH_HILOGI(MODULE_SERVICE, "Ignore open camera fail.");
FACEAUTH_HILOGE(MODULE_SERVICE, "Ignore open camera fail.");
}
// start algorithm operation
std::shared_ptr<FaceAuthCA> faceAuthCA = FaceAuthCA::GetInstance();
@ -293,14 +295,15 @@ void FaceAuthManager::DoAuthenticate(const AuthParam &param)
reqType.operateType = FACE_OPERATE_TYPE_LOCAL_AUTH;
FaceAuthReq::GetInstance()->RemoveRequireInfo(reqType);
}
int32_t FaceAuthManager::AddEnrollmentRequest(const EnrollParam &param)
{
FACEAUTH_HILOGI(MODULE_SERVICE, "%{public}s run.", __PRETTY_FUNCTION__);
FACEAUTH_HILOGI(MODULE_SERVICE, "[DoEnroll]scheduleID = %{public}llu.", param.scheduleID);
FACEAUTH_HILOGI(MODULE_SERVICE, "[DoEnroll]templateID = %{public}llu.", param.templateID);
FACEAUTH_HILOGD(MODULE_SERVICE, "[DoEnroll]scheduleID = %{public}llu.", param.scheduleID);
FACEAUTH_HILOGD(MODULE_SERVICE, "[DoEnroll]templateID = %{public}llu.", param.templateID);
// check param
if (param.templateID < 0) {
FACEAUTH_HILOGI(MODULE_SERVICE, "Parameter check error.");
FACEAUTH_HILOGE(MODULE_SERVICE, "Parameter check error.");
return FA_RET_ERROR;
}
// check req info list is full
@ -308,14 +311,14 @@ int32_t FaceAuthManager::AddEnrollmentRequest(const EnrollParam &param)
reqType.reqId = param.scheduleID;
reqType.operateType = FACE_OPERATE_TYPE_ENROLL;
if (FaceAuthReq::GetInstance()->IsReqNumReachedMax(FACE_OPERATE_TYPE_ENROLL)) {
FACEAUTH_HILOGI(MODULE_SERVICE, "Enroll is Max.");
FACEAUTH_HILOGE(MODULE_SERVICE, "Enroll is Max.");
return FA_RET_ERROR;
}
// send event
FaceInfo faceInfo = {};
faceInfo.eventId = GenerateEventId();
if (faceInfo.eventId == INVALID_EVENT_ID) {
FACEAUTH_HILOGI(MODULE_SERVICE, "faceInfo.eventId is invalid.");
FACEAUTH_HILOGE(MODULE_SERVICE, "faceInfo.eventId is invalid.");
return FA_RET_ERROR;
}
faceInfo.uId = param.callerUID;
@ -325,11 +328,12 @@ int32_t FaceAuthManager::AddEnrollmentRequest(const EnrollParam &param)
handler_->SendEvent(faceInfo.eventId, std::move(authInfo), priority);
return FA_RET_OK;
}
void FaceAuthManager::DoEnroll(const EnrollParam &param)
{
// check param
if (param.templateID < 0) {
FACEAUTH_HILOGI(MODULE_SERVICE, "Parameter check error.");
FACEAUTH_HILOGE(MODULE_SERVICE, "Parameter check error.");
return;
}
this->InitAlgorithm(FACE_LOCAL_INIT_ALGO_NAME);
@ -377,11 +381,12 @@ void FaceAuthManager::DoEnroll(const EnrollParam &param)
reqType.operateType = FACE_OPERATE_TYPE_ENROLL;
FaceAuthReq::GetInstance()->RemoveRequireInfo(reqType);
}
int32_t FaceAuthManager::AddRemoveRequest(const RemoveParam &param)
{
FACEAUTH_HILOGI(MODULE_SERVICE, "%{public}s run.", __PRETTY_FUNCTION__);
FACEAUTH_HILOGI(MODULE_SERVICE, "[DoRemove]scheduleID = %{public}llu.", param.scheduleID);
FACEAUTH_HILOGI(MODULE_SERVICE, "[DoRemove]templateID = %{public}llu.", param.templateID);
FACEAUTH_HILOGD(MODULE_SERVICE, "[DoRemove]scheduleID = %{public}llu.", param.scheduleID);
FACEAUTH_HILOGD(MODULE_SERVICE, "[DoRemove]templateID = %{public}llu.", param.templateID);
// check param
if (param.templateID < 0) {
FACEAUTH_HILOGI(MODULE_SERVICE, "Parameter check error.");
@ -392,14 +397,14 @@ int32_t FaceAuthManager::AddRemoveRequest(const RemoveParam &param)
reqType.reqId = param.scheduleID;
reqType.operateType = FACE_OPERATE_TYPE_DEL;
if (FaceAuthReq::GetInstance()->IsReqNumReachedMax(FACE_OPERATE_TYPE_DEL)) {
FACEAUTH_HILOGI(MODULE_SERVICE, "Remove is Max.");
FACEAUTH_HILOGE(MODULE_SERVICE, "Remove is Max.");
return FA_RET_ERROR;
}
// send event
FaceInfo faceInfo = {};
faceInfo.eventId = GenerateEventId();
if (faceInfo.eventId == INVALID_EVENT_ID) {
FACEAUTH_HILOGI(MODULE_SERVICE, "faceInfo.eventId is invalid.");
FACEAUTH_HILOGE(MODULE_SERVICE, "faceInfo.eventId is invalid.");
return FA_RET_ERROR;
}
faceInfo.uId = param.callerUID;
@ -409,11 +414,12 @@ int32_t FaceAuthManager::AddRemoveRequest(const RemoveParam &param)
handler_->SendEvent(faceInfo.eventId, std::move(authInfo), priority);
return FA_RET_OK;
}
void FaceAuthManager::DoRemove(const RemoveParam &param)
{
// check param
if (param.templateID < 0) {
FACEAUTH_HILOGI(MODULE_SERVICE, "Parameter check error.");
FACEAUTH_HILOGE(MODULE_SERVICE, "Parameter check error.");
return;
}
std::shared_ptr<FaceAuthCA> faceAuthCA = FaceAuthCA::GetInstance();
@ -433,11 +439,12 @@ void FaceAuthManager::DoRemove(const RemoveParam &param)
reqType.operateType = FACE_OPERATE_TYPE_DEL;
FaceAuthReq::GetInstance()->RemoveRequireInfo(reqType);
}
FIRetCode FaceAuthManager::OperForAlgorithm(uint64_t scheduleID)
{
std::shared_ptr<FaceAuthCA> faceAuthCA = FaceAuthCA::GetInstance();
if (faceAuthCA == nullptr) {
FACEAUTH_HILOGI(MODULE_SERVICE, "faceAuthCA is null.");
FACEAUTH_HILOGE(MODULE_SERVICE, "faceAuthCA is null.");
return FI_RC_INVALID_ARGUMENT;
}
int32_t retCode = 0;
@ -458,6 +465,7 @@ FIRetCode FaceAuthManager::OperForAlgorithm(uint64_t scheduleID)
HandleAlgoResult(scheduleID);
return FI_RC_OK;
}
void FaceAuthManager::HandleAlgoResult(uint64_t scheduleID)
{
std::shared_ptr<FaceAuthCA> faceAuthCA = FaceAuthCA::GetInstance();
@ -474,6 +482,7 @@ void FaceAuthManager::HandleAlgoResult(uint64_t scheduleID)
authAttributes->SetUint8ArrayValue(AUTH_RESULT, retResult.coauthMsg);
Finish(scheduleID, TYPE_ALL_IN_ONE, retResult.result, authAttributes);
}
int32_t FaceAuthManager::CancelAuth(const AuthParam &param)
{
int32_t result = FA_RET_OK;
@ -532,6 +541,7 @@ void FaceAuthManager::SetExecutorMessenger(const sptr<AuthResPool::IExecutorMess
{
executorMessenger_ = messager;
}
void FaceAuthManager::SendData(uint64_t scheduleId,
uint64_t transNum,
int32_t srcType,
@ -576,6 +586,7 @@ FIRetCode FaceAuthManager::InitAlgorithm(std::string bundleName)
FACEAUTH_HILOGE(MODULE_SERVICE, "Init Fail %{public}d", result);
return FI_RC_ERROR;
}
FIRetCode FaceAuthManager::ReleaseAlgorithm(std::string bundleName)
{
FACEAUTH_HILOGI(MODULE_SERVICE, "Release, bundleName:%{public}s", bundleName.c_str());
@ -595,6 +606,7 @@ FIRetCode FaceAuthManager::ReleaseAlgorithm(std::string bundleName)
FACEAUTH_HILOGE(MODULE_SERVICE, "Release Fail %{public}d", result);
return FI_RC_ERROR;
}
bool FaceAuthManager::IsAlgorithmInited()
{
if (bundleNameList_.empty()) {
@ -604,6 +616,7 @@ bool FaceAuthManager::IsAlgorithmInited()
FACEAUTH_HILOGI(MODULE_SERVICE, "FaceAuthAlgoDispatcher IsInited bundleNameList_ is not empty, no need init");
return false;
}
AlgoResult FaceAuthManager::IsNeedAlgoLoad(std::string bundleName)
{
FACEAUTH_HILOGI(MODULE_SERVICE, "FaceAuthAlgoDispatcher IsNeedAlgoLoad start");
@ -641,6 +654,7 @@ AlgoResult FaceAuthManager::IsNeedAlgoRelease(std::string bundleName)
}
return result;
}
int32_t FaceAuthManager::GenerateEventId()
{
int32_t randomNum = INVALID_EVENT_ID;
@ -652,6 +666,7 @@ int32_t FaceAuthManager::GenerateEventId()
FACEAUTH_HILOGI(MODULE_SERVICE, "GenerateEventId generate eventId %{public}u", eventId);
return eventId;
}
int32_t FaceAuthManager::OpenCamera()
{
std::promise<int32_t> promiseobj;
@ -670,6 +685,7 @@ int32_t FaceAuthManager::OpenCamera()
}
return FA_RET_OK;
}
int32_t FaceAuthManager::WaitAlgorithmProcessDone(uint64_t scheduleID)
{
std::promise<int32_t> promiseobj;
@ -690,6 +706,7 @@ int32_t FaceAuthManager::WaitAlgorithmProcessDone(uint64_t scheduleID)
}
return FA_RET_OK;
}
bool FaceAuthManager::GetRandomNum(int32_t *randomNum)
{
if (randomNum == nullptr) {
@ -716,6 +733,7 @@ bool FaceAuthManager::GetRandomNum(int32_t *randomNum)
BN_free(bn);
return true;
}
FIRetCode FaceAuthManager::DoWaitInitAlgorithm(std::future<int32_t> futureobj)
{
std::chrono::microseconds span(INIT_DYNAMIC_TIME_OUT);

2
services/faceauth/src/face_auth_service.cpp Executable file → Normal file
View File

@ -86,7 +86,7 @@ void FaceAuthService::Start()
ret = manager_->Init();
}
if (FA_RET_OK == ret) {
FACEAUTH_HILOGE(MODULE_SERVICE, "Init() result success.");
FACEAUTH_HILOGI(MODULE_SERVICE, "Init() result success.");
} else {
FACEAUTH_HILOGE(MODULE_SERVICE, "Init() result failed.");
}

View File

@ -1,3 +1,18 @@
/*
* Copyright (c) 2022 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.
*/
// Top-level build file where you can add configuration options common to all sub-projects/modules.
apply plugin: 'com.huawei.ohos.app'

View File

@ -1,3 +1,18 @@
/*
* Copyright (c) 2022 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.
*/
apply plugin: 'com.huawei.ohos.library'
//For instructions on signature configuration, see https://developer.harmonyos.com/cn/docs/documentation/doc-guides/ide_debug_device-0000001053822404#section1112183053510
ohos {

View File

@ -1,3 +1,18 @@
/*
* Copyright (c) 2022 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.
*/
apply plugin: 'com.huawei.ohos.library'
//For instructions on signature configuration, see https://developer.harmonyos.com/cn/docs/documentation/doc-guides/ide_debug_device-0000001053822404#section1112183053510
ohos {

View File

@ -1,10 +0,0 @@
# Project-wide Gradle settings.
# IDE (e.g. DevEco Studio) users:
# Gradle settings configured through the IDE *will override*
# any settings specified in this file.
# For more details on how to configure your build environment visit
# http://www.gradle.org/docs/current/userguide/build_environment.html
# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
# If the Chinese output is garbled, please configure the following parameter.
# org.gradle.jvmargs=-Dfile.encoding=GBK

View File

@ -1,3 +1,18 @@
/*
* Copyright (c) 2022 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.
*/
apply plugin: 'com.huawei.ohos.hap'
//For instructions on signature configuration, see https://developer.harmonyos.com/cn/docs/documentation/doc-guides/ide_debug_device-0000001053822404#section1112183053510
ohos {

View File

@ -1,3 +1,18 @@
/*
* Copyright (c) 2022 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.
*/
apply plugin: 'com.huawei.ohos.hap'
ohos {
compileSdkVersion 7