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