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_start_with_observer.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 "relational_store:native_dataability", 81 "relational_store:native_rdb", 82 "samgr:samgr_proxy", 83 ] 84 85 subsystem_name = "ability" 86 part_name = "ability_runtime" 87} 88 89ohos_executable("aa") { 90 sources = [ "src/main.cpp" ] 91 92 cflags = [] 93 if (target_cpu == "arm") { 94 cflags += [ "-DBINDER_IPC_32BIT" ] 95 } 96 97 deps = [ ":tools_aa_source_set" ] 98 99 external_deps = [ 100 "ability_base:base", 101 "ability_base:configuration", 102 "ability_base:session_info", 103 "c_utils:utils", 104 "hicollie:libhicollie", 105 "hilog:libhilog", 106 "ipc:ipc_core", 107 ] 108 109 defines = [] 110 111 install_enable = true 112 113 subsystem_name = "ability" 114 part_name = "ability_runtime" 115} 116 117ohos_prebuilt_etc("shell_command_executor_config.json") { 118 source = "resource/shell_command_executor_config.json" 119 subsystem_name = "ability" 120 part_name = "ability_runtime" 121} 122 123group("tools_aa") { 124 deps = [ 125 ":aa", 126 ":shell_command_executor_config.json", 127 ] 128} 129