• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2021 Huawei Device Co., Ltd.
2# Licensed under the Apache License, Version 2.0 (the "License");
3# you may not use this file except in compliance with the License.
4# You may obtain a copy of the License at
5#
6#     http://www.apache.org/licenses/LICENSE-2.0
7#
8# Unless required by applicable law or agreed to in writing, software
9# distributed under the License is distributed on an "AS IS" BASIS,
10# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11# See the License for the specific language governing permissions and
12# limitations under the License.
13
14import("//build/ohos.gni")
15import("//build/ohos/ohos_kits.gni")
16import("//build/ohos/ohos_part.gni")
17import("//build/ohos/ohos_test.gni")
18import("./updateengine.gni")
19
20ohos_part("$updateengine_part_name") {
21  subsystem_name = "updater"
22  module_list = [
23    "$updateengine_root_path/frameworks/js/napi/client:$updateengine_client_library_name",
24    "$updateengine_root_path/interfaces/inner_api/engine:$updateengine_inner_library_name",
25    "$updateengine_root_path/services/engine:$updateengine_library_name",
26    "$updateengine_root_path/services/engine:updater_sa.rc",
27    "$updateengine_root_path/services/engine/sa_profile:updater_sa_profile",
28  ]
29  origin_name = "$updateengine_part_name"
30  variant = "phone"
31}
32
33ohos_inner_kits("$updateengine_inner_kits") {
34  sdk_libs = [
35    {
36      type = "so"
37      name = "$updateengine_root_path/interfaces/inner_api/engine:$updateengine_inner_library_name"
38      header = {
39        header_files = [
40          "iupdate_callback.h",
41          "iupdate_service.h",
42          "update_helper.h",
43          "update_service_kits_impl.h",
44          "update_service_kits.h",
45        ]
46        header_base = "$updateengine_root_path/interfaces/inner_api/include"
47      }
48    },
49  ]
50  part_name = "$updateengine_part_name"
51  origin_name = "$updateengine_part_name"
52  variant = "phone"
53}
54
55ohos_part_test("$updateengine_test_name") {
56  testonly = true
57  test_packages = [
58    "$updateengine_root_path/test/fuzztest/updateservicecancel_fuzzer:UpdateServiceCancelFuzzTest",
59    "$updateengine_root_path/test/fuzztest/updateservicechecknewversion_fuzzer:UpdateServiceCheckNewVersionFuzzTest",
60    "$updateengine_root_path/test/fuzztest/updateservicedownload_fuzzer:UpdateServiceDownloadFuzzTest",
61    "$updateengine_root_path/test/fuzztest/updateservicegetnewversion_fuzzer:UpdateServiceGetNewVersionFuzzTest",
62    "$updateengine_root_path/test/fuzztest/updateservicegetupgradepolicy_fuzzer:UpdateServiceGetUpgradePolicyFuzzTest",
63    "$updateengine_root_path/test/fuzztest/updateservicegetupgradestatus_fuzzer:UpdateServiceGetUpgradeStatusFuzzTest",
64    "$updateengine_root_path/test/fuzztest/updateserviceregisterupdatecallback_fuzzer:UpdateServiceRegisterUpdateCallbackFuzzTest",
65    "$updateengine_root_path/test/fuzztest/updateservicesetupgradepolicy_fuzzer:UpdateServiceSetUpgradePolicyFuzzTest",
66    "$updateengine_root_path/test/fuzztest/updateserviceunregisterupdatecallback_fuzzer:UpdateServiceUnregisterUpdateCallbackFuzzTest",
67  ]
68  deps = [ ":$updateengine_part_name" ]
69  part_name = "$updateengine_part_name"
70  subsystem_name = "updater"
71}
72
73group("unittest") {
74  testonly = true
75  deps = [ "test/unittest:$updateengine_unittest_name" ]
76}
77
78group("update_client_jsapi") {
79  if (support_jsapi) {
80    deps = [ "$updateengine_root_path/frameworks/js/napi/client/:$updateengine_client_library_name" ]
81  }
82}
83