13e5483f6Sopenharmony_ci# Copyright (C) 2024 Huawei Device Co., Ltd.
23e5483f6Sopenharmony_ci# Licensed under the Apache License, Version 2.0 (the "License");
33e5483f6Sopenharmony_ci# you may not use this file except in compliance with the License.
43e5483f6Sopenharmony_ci# You may obtain a copy of the License at
53e5483f6Sopenharmony_ci#
63e5483f6Sopenharmony_ci#   http://www.apache.org/licenses/LICENSE-2.0
73e5483f6Sopenharmony_ci#
83e5483f6Sopenharmony_ci# Unless required by applicable law or agreed to in writing, software
93e5483f6Sopenharmony_ci# distributed under the License is distributed on an "AS IS" BASIS,
103e5483f6Sopenharmony_ci# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
113e5483f6Sopenharmony_ci# See the License for the specific language governing permissions and
123e5483f6Sopenharmony_ci# limitations under the License.
133e5483f6Sopenharmony_ci
143e5483f6Sopenharmony_ciimport("//build/ohos.gni")
153e5483f6Sopenharmony_ciimport("//foundation/multimedia/ringtone_library/ringtone_library.gni")
163e5483f6Sopenharmony_ci
173e5483f6Sopenharmony_ciohos_hap("ringtone_extension_hap") {
183e5483f6Sopenharmony_ci  hap_profile = "RingtoneLibraryExt/entry/src/main/module.json"
193e5483f6Sopenharmony_ci  deps = [
203e5483f6Sopenharmony_ci    ":RingtoneLibStage_js_assets",
213e5483f6Sopenharmony_ci    ":RingtoneLibStage_resources",
223e5483f6Sopenharmony_ci  ]
233e5483f6Sopenharmony_ci  publicity_file = "${RINGTONE_ROOT_PATH}/publicity.xml"
243e5483f6Sopenharmony_ci  certificate_profile = "${RINGTONE_EXT_HAP_PATH}/signature/ringtonelibrary.p7b"
253e5483f6Sopenharmony_ci  shared_libraries = [ "${RINGTONE_SERVICES_PATH}:ringtone_data_extension" ]
263e5483f6Sopenharmony_ci  hap_name = "Ringtone_Library_Ext"
273e5483f6Sopenharmony_ci  part_name = "prebuilt_hap"
283e5483f6Sopenharmony_ci  subsystem_name = "applications"
293e5483f6Sopenharmony_ci  module_install_dir = "app/com.ohos.ringtonelibrary.RingtoneLibraryData"
303e5483f6Sopenharmony_ci  if (defined(sign_hap_py_path)) {
313e5483f6Sopenharmony_ci    certificate_profile =
323e5483f6Sopenharmony_ci        "${RINGTONE_EXT_HAP_PATH}/signature/ringtonelibrary_new.p7b"
333e5483f6Sopenharmony_ci    key_alias = "ringtonelibrarydata"
343e5483f6Sopenharmony_ci    private_key_path = "ringtonelibrarydata"
353e5483f6Sopenharmony_ci    compatible_version = "12"
363e5483f6Sopenharmony_ci  }
373e5483f6Sopenharmony_ci}
383e5483f6Sopenharmony_ci
393e5483f6Sopenharmony_ciohos_js_assets("RingtoneLibStage_js_assets") {
403e5483f6Sopenharmony_ci  hap_profile = "RingtoneLibraryExt/entry/src/main/module.json"
413e5483f6Sopenharmony_ci  ets2abc = true
423e5483f6Sopenharmony_ci  source_dir = "RingtoneLibraryExt/entry/src/main/ets"
433e5483f6Sopenharmony_ci}
443e5483f6Sopenharmony_ci
453e5483f6Sopenharmony_ciohos_app_scope("RingtoneLibStage_app_profile") {
463e5483f6Sopenharmony_ci  app_profile = "RingtoneLibraryExt/AppScope/app.json"
473e5483f6Sopenharmony_ci  sources = [ "RingtoneLibraryExt/AppScope/resources" ]
483e5483f6Sopenharmony_ci}
493e5483f6Sopenharmony_ci
503e5483f6Sopenharmony_ciohos_resources("RingtoneLibStage_resources") {
513e5483f6Sopenharmony_ci  hap_profile = "RingtoneLibraryExt/entry/src/main/module.json"
523e5483f6Sopenharmony_ci  deps = [ ":RingtoneLibStage_app_profile" ]
533e5483f6Sopenharmony_ci  sources = [ "RingtoneLibraryExt/entry/src/main/resources" ]
543e5483f6Sopenharmony_ci}
55