# Copyright (c) 2021 Huawei Device Co., Ltd.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

import("//build/ohos.gni")
import("//foundation/appexecfwk/standard/appexecfwk.gni")
SUBDEMOSYSTEM_DIR = "//foundation/appexecfwk/standard/test/resource/amssystemtestability/abilitySrc/amsDataSystemTestB"
SUBST_TOOLS_DIR = "//foundation/appexecfwk/standard/test/resource/amssystemtestability/abilitySrc/tools"
config("amsDataSystemTestBConfig") {
  visibility = [ ":*" ]
  include_dirs = [
    "${SUBDEMOSYSTEM_DIR}/include",
    "//foundation/aafwk/standard/frameworks/kits/appkit/native/app",
    "//foundation/aafwk/standard/interfaces/innerkits/want/include/ohos/aafwk/content",
    "//foundation/aafwk/standard/interfaces/innerkits/ability_manager/include",
    "//foundation/appexecfwk/standard/interfaces/innerkits/libeventhandler/include",
    "//foundation/appexecfwk/standard/services/bundlemgr/include",
    "//foundation/aafwk/standard/services/abilitymgr/include",
    "//foundation/appexecfwk/standard/common/log/include",
    "//foundation/distributedschedule/dmsfwk/services/dtbschedmgr/include",
    "${SUBST_TOOLS_DIR}/include",
    "//third_party/jsoncpp/include",
  ]
  defines = [
    "APP_LOG_TAG = \"amsDataSystemTestB\"",
    "LOG_DOMAIN = 0xD002200",
  ]
  cflags = []
  if (target_cpu == "arm") {
    cflags += [ "-DBINDER_IPC_32BIT" ]
  }
}
ohos_shared_library("amsDataSystemTestB") {
  sources = [
    "${SUBDEMOSYSTEM_DIR}/src/ams_st_data_ability_data_b.cpp",
    "${SUBDEMOSYSTEM_DIR}/src/ams_st_data_ability_page_b.cpp",
    "${SUBST_TOOLS_DIR}/src/event.cpp",
    "${SUBST_TOOLS_DIR}/src/stoperator.cpp",
  ]
  configs = [ ":amsDataSystemTestBConfig" ]
  deps = [
    "//foundation/aafwk/standard/frameworks/kits/ability/native:abilitykit_native",
    "//foundation/aafwk/standard/frameworks/kits/ability/native:dummy_classes",
    "//foundation/aafwk/standard/frameworks/kits/appkit:appkit_native",
    "//foundation/aafwk/standard/interfaces/innerkits/app_manager:app_manager",
    "//foundation/aafwk/standard/interfaces/innerkits/want:want",
    "//foundation/appexecfwk/standard/common:libappexecfwk_common",
    "//foundation/appexecfwk/standard/interfaces/innerkits/appexecfwk_base:appexecfwk_base",
    "//foundation/appexecfwk/standard/interfaces/innerkits/appexecfwk_core:appexecfwk_core",
    "//foundation/appexecfwk/standard/services/bundlemgr:libbms",
    "//foundation/distributeddatamgr/appdatamgr/interfaces/innerkits/native_dataability:native_dataability",
    "//foundation/distributeddatamgr/appdatamgr/interfaces/innerkits/native_rdb:native_rdb",
    "//foundation/distributedschedule/dmsfwk/interfaces/innerkits/uri:zuri",
    "//third_party/jsoncpp:jsoncpp",
    "//utils/native/base:utilsbase",
  ]
  external_deps = [
    "ces_standard:cesfwk_innerkits",
    "hiviewdfx_hilog_native:libhilog",
    "ipc:ipc_core",
    "native_appdatamgr:native_appdatafwk",
    "native_appdatamgr:native_dataability",
    "native_appdatamgr:native_rdb",
  ]
  subsystem_name = "amssystemtestability"
}
