# Copyright (c) 2021 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. import("//build/ohos.gni") import("//build/ohos/ohos_kits.gni") import("//build/ohos/ohos_part.gni") import("//build/ohos/ohos_test.gni") import("./updateengine.gni") ohos_part("$updateengine_part_name") { subsystem_name = "updater" module_list = [ "$updateengine_root_path/frameworks/js/napi/client:$updateengine_client_library_name", "$updateengine_root_path/interfaces/inner_api/engine:$updateengine_inner_library_name", "$updateengine_root_path/services/engine:$updateengine_library_name", "$updateengine_root_path/services/engine:updater_sa.rc", "$updateengine_root_path/services/engine/sa_profile:updater_sa_profile", ] origin_name = "$updateengine_part_name" variant = "phone" } ohos_inner_kits("$updateengine_inner_kits") { sdk_libs = [ { type = "so" name = "$updateengine_root_path/interfaces/inner_api/engine:$updateengine_inner_library_name" header = { header_files = [ "iupdate_callback.h", "iupdate_service.h", "update_helper.h", "update_service_kits_impl.h", "update_service_kits.h", ] header_base = "$updateengine_root_path/interfaces/inner_api/include" } }, ] part_name = "$updateengine_part_name" origin_name = "$updateengine_part_name" variant = "phone" } ohos_part_test("$updateengine_test_name") { testonly = true test_packages = [ "$updateengine_root_path/test/fuzztest/updateservicecancel_fuzzer:UpdateServiceCancelFuzzTest", "$updateengine_root_path/test/fuzztest/updateservicechecknewversion_fuzzer:UpdateServiceCheckNewVersionFuzzTest", "$updateengine_root_path/test/fuzztest/updateservicedownload_fuzzer:UpdateServiceDownloadFuzzTest", "$updateengine_root_path/test/fuzztest/updateservicegetnewversion_fuzzer:UpdateServiceGetNewVersionFuzzTest", "$updateengine_root_path/test/fuzztest/updateservicegetupgradepolicy_fuzzer:UpdateServiceGetUpgradePolicyFuzzTest", "$updateengine_root_path/test/fuzztest/updateservicegetupgradestatus_fuzzer:UpdateServiceGetUpgradeStatusFuzzTest", "$updateengine_root_path/test/fuzztest/updateserviceregisterupdatecallback_fuzzer:UpdateServiceRegisterUpdateCallbackFuzzTest", "$updateengine_root_path/test/fuzztest/updateservicesetupgradepolicy_fuzzer:UpdateServiceSetUpgradePolicyFuzzTest", "$updateengine_root_path/test/fuzztest/updateserviceunregisterupdatecallback_fuzzer:UpdateServiceUnregisterUpdateCallbackFuzzTest", ] deps = [ ":$updateengine_part_name" ] part_name = "$updateengine_part_name" subsystem_name = "updater" } group("unittest") { testonly = true deps = [ "test/unittest:$updateengine_unittest_name" ] } group("update_client_jsapi") { if (support_jsapi) { deps = [ "$updateengine_root_path/frameworks/js/napi/client/:$updateengine_client_library_name" ] } }