1# Copyright (c) 2021-2024 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/test.gni") 15import("//foundation/ability/ability_runtime/ability_runtime.gni") 16 17config("ability_command_config") { 18 include_dirs = [ 19 "include", 20 "${ability_runtime_innerkits_path}/app_manager/include/appmgr", 21 "${ability_runtime_services_path}/abilitymgr/include/utils", 22 "${ability_runtime_services_path}/abilitymgr/include", 23 ] 24} 25 26config("ability_command_exception_config") { 27 cflags_cc = [ "-fexceptions" ] 28} 29 30ohos_static_library("tools_aa_source_set") { 31 sources = [ 32 "src/ability_command.cpp", 33 "src/ability_tool_command.cpp", 34 "src/shell_command.cpp", 35 "src/shell_command_config_loader.cpp", 36 "src/shell_command_executor.cpp", 37 "src/shell_command_result.cpp", 38 "src/system_time.cpp", 39 "src/test_observer.cpp", 40 "src/test_observer_proxy.cpp", 41 "src/test_observer_stub.cpp", 42 ] 43 44 public_configs = [ 45 ":ability_command_config", 46 ":ability_command_exception_config", 47 "${ability_runtime_services_path}/abilitymgr:abilityms_config", 48 "${ability_runtime_services_path}/common:common_config", 49 ] 50 51 cflags = [] 52 if (target_cpu == "arm") { 53 cflags += [ "-DBINDER_IPC_32BIT" ] 54 } 55 56 deps = [ 57 "${ability_runtime_innerkits_path}/ability_manager:ability_manager", 58 "${ability_runtime_innerkits_path}/ability_manager:ability_start_options", 59 "${ability_runtime_innerkits_path}/ability_manager:ability_start_setting", 60 "${ability_runtime_innerkits_path}/ability_manager:mission_info", 61 "${ability_runtime_innerkits_path}/app_manager:app_manager", 62 ] 63 64 external_deps = [ 65 "ability_base:base", 66 "ability_base:want", 67 "bundle_framework:appexecfwk_core", 68 "c_utils:utils", 69 "eventhandler:libeventhandler", 70 "hilog:libhilog", 71 "init:libbegetutil", 72 "ipc:ipc_core", 73 ] 74 public_external_deps = [ 75 "ability_base:session_info", 76 "bundle_framework:appexecfwk_base", 77 "graphic_2d:color_manager", 78 "image_framework:image_native", 79 "init:libbegetutil", 80 "jsoncpp:jsoncpp", 81 "relational_store:native_dataability", 82 "relational_store:native_rdb", 83 "samgr:samgr_proxy", 84 ] 85 86 subsystem_name = "ability" 87 part_name = "ability_runtime" 88} 89 90ohos_executable("aa") { 91 sources = [ "src/main.cpp" ] 92 93 cflags = [] 94 if (target_cpu == "arm") { 95 cflags += [ "-DBINDER_IPC_32BIT" ] 96 } 97 98 deps = [ ":tools_aa_source_set" ] 99 100 external_deps = [ 101 "ability_base:base", 102 "ability_base:configuration", 103 "ability_base:session_info", 104 "hicollie:libhicollie", 105 "hilog:libhilog", 106 "ipc:ipc_core", 107 ] 108 109 symlink_target_name = [ "ability_tool" ] 110 111 defines = [] 112 113 install_enable = true 114 115 subsystem_name = "ability" 116 part_name = "ability_runtime" 117} 118 119ohos_prebuilt_etc("shell_command_executor_config.json") { 120 source = "resource/shell_command_executor_config.json" 121 subsystem_name = "ability" 122 part_name = "ability_runtime" 123} 124 125group("tools_aa") { 126 deps = [ 127 ":aa", 128 ":shell_command_executor_config.json", 129 ] 130} 131