1# Copyright (c) 2023 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("//foundation/ability/ability_runtime/ability_runtime.gni") 16import("//foundation/ability/form_fwk/form_fwk.gni") 17 18config("formrender_config") { 19 visibility = [ ":*" ] 20 include_dirs = [ 21 "//foundation/arkui/ace_engine/frameworks/core/components/form/resource/", 22 "include", 23 ] 24 cflags = [] 25 if (target_cpu == "arm") { 26 cflags += [ "-DBINDER_IPC_32BIT" ] 27 } 28} 29 30ohos_hap("formrender_service_hap") { 31 hap_profile = "FormRenderService/entry/src/main/module.json" 32 deps = [ 33 ":FormRender_js_assets", 34 ":FormRender_resources", 35 ] 36 shared_libraries = [ ":formrender" ] 37 certificate_profile = "${form_render_service_path}/signature/formrender.p7b" 38 hap_name = "Form_Render_Service" 39 part_name = "form_fwk" 40 subsystem_name = "ability" 41 module_install_dir = "app/com.ohos.formrenderservice" 42} 43 44ohos_js_assets("FormRender_js_assets") { 45 hap_profile = "FormRenderService/entry/src/main/module.json" 46 ets2abc = true 47 source_dir = "FormRenderService/entry/src/main/ets" 48} 49 50ohos_app_scope("FormRender_app_profile") { 51 app_profile = "FormRenderService/AppScope/app.json" 52 sources = [ "FormRenderService/AppScope/resources" ] 53} 54 55ohos_resources("FormRender_resources") { 56 sources = [ "FormRenderService/entry/src/main/resources" ] 57 deps = [ ":FormRender_app_profile" ] 58 hap_profile = "FormRenderService/entry/src/main/module.json" 59} 60 61ohos_shared_library("formrender") { 62 install_enable = true 63 64 configs = [ ":formrender_config" ] 65 66 sources = [ 67 "src/form_render_impl.cpp", 68 "src/form_render_record.cpp", 69 "src/form_render_service_extension.cpp", 70 ] 71 72 defines = [ "AMS_LOG_TAG = \"FormRenderService\"" ] 73 74 deps = [ "${form_fwk_path}:form_manager" ] 75 76 external_deps = [ 77 "ability_base:configuration", 78 "ability_base:want", 79 "ability_runtime:ability_deps_wrapper", 80 "ability_runtime:ability_manager", 81 "ability_runtime:abilitykit_native", 82 "ability_runtime:app_context", 83 "ability_runtime:runtime", 84 "ability_runtime:service_extension", 85 "ace_engine:ace_form_render", 86 "bundle_framework:appexecfwk_base", 87 "c_utils:utils", 88 "eventhandler:libeventhandler", 89 "hitrace_native:hitrace_meter", 90 "hiviewdfx_hilog_native:libhilog", 91 "ipc:ipc_core", 92 ] 93 94 subsystem_name = "ability" 95 part_name = "form_fwk" 96} 97