load("//cuttlefish/bazel:rules.bzl", "cf_cc_library")

package(
    default_visibility = ["//:android_cuttlefish"],
)

exports_files([
    ".clang-tidy",
    "create.cpp",
    "create.h",
    "help.cpp",
    "help.h",
    "load_configs.cpp",
    "load_configs.h",
])

cf_cc_library(
    name = "bugreport",
    srcs = ["bugreport.cpp"],
    hdrs = ["bugreport.h"],
    clang_format_enabled = False,
    deps = [
        "//cuttlefish/common/libs/utils:files",
        "//cuttlefish/common/libs/utils:subprocess",
        "//cuttlefish/common/libs/utils:subprocess_managed_stdio",
        "//cuttlefish/common/libs/utils:users",
        "//cuttlefish/flag_parser",
        "//cuttlefish/host/commands/cvd/cli:command_request",
        "//cuttlefish/host/commands/cvd/cli:interruptible_terminal",
        "//cuttlefish/host/commands/cvd/cli:types",
        "//cuttlefish/host/commands/cvd/cli:utils",
        "//cuttlefish/host/commands/cvd/cli/commands:command_handler",
        "//cuttlefish/host/commands/cvd/cli/selector",
        "//cuttlefish/host/commands/cvd/instances",
        "//cuttlefish/host/commands/cvd/instances:instance_manager",
        "//cuttlefish/host/commands/cvd/utils",
        "//cuttlefish/host/libs/log_names",
        "//cuttlefish/host/libs/zip:zip_file",
        "//cuttlefish/host/libs/zip/libzip_cc:archive",
        "//cuttlefish/result",
        "//libbase",
        "@abseil-cpp//absl/log",
        "@abseil-cpp//absl/strings",
        "@fmt",
    ],
)

cf_cc_library(
    name = "cache",
    srcs = ["cache.cpp"],
    hdrs = ["cache.h"],
    deps = [
        "//cuttlefish/flag_parser",
        "//cuttlefish/host/commands/cvd/cache",
        "//cuttlefish/host/commands/cvd/cli:command_request",
        "//cuttlefish/host/commands/cvd/cli:types",
        "//cuttlefish/host/commands/cvd/cli/commands:command_handler",
        "//cuttlefish/host/commands/cvd/utils",
        "//cuttlefish/result",
        "//libbase",
        "@fmt",
        "@jsoncpp",
    ],
)

cf_cc_library(
    name = "clear",
    srcs = ["clear.cpp"],
    hdrs = ["clear.h"],
    deps = [
        "//cuttlefish/flag_parser",
        "//cuttlefish/host/commands/cvd/cli:command_request",
        "//cuttlefish/host/commands/cvd/cli:types",
        "//cuttlefish/host/commands/cvd/cli/commands:command_handler",
        "//cuttlefish/host/commands/cvd/instances",
        "//cuttlefish/host/commands/cvd/instances:instance_manager",
        "//cuttlefish/result",
    ],
)

cf_cc_library(
    name = "command_handler",
    srcs = ["command_handler.cpp"],
    hdrs = ["command_handler.h"],
    deps = [
        "//cuttlefish/flag_parser",
        "//cuttlefish/host/commands/cvd/cli:command_request",
        "//cuttlefish/host/commands/cvd/cli:help_format",
        "//cuttlefish/host/commands/cvd/cli:types",
        "//cuttlefish/host/commands/cvd/cli/selector:selector_common_parser",
        "//cuttlefish/result",
    ],
)

cf_cc_library(
    name = "display",
    srcs = ["display.cpp"],
    hdrs = ["display.h"],
    clang_format_enabled = False,
    deps = [
        "//cuttlefish/common/libs/utils:files",
        "//cuttlefish/common/libs/utils:subprocess",
        "//cuttlefish/flag_parser",
        "//cuttlefish/host/commands/cvd/cli:command_request",
        "//cuttlefish/host/commands/cvd/cli:types",
        "//cuttlefish/host/commands/cvd/cli:utils",
        "//cuttlefish/host/commands/cvd/cli/commands:command_handler",
        "//cuttlefish/host/commands/cvd/cli/selector",
        "//cuttlefish/host/commands/cvd/instances",
        "//cuttlefish/host/commands/cvd/instances:instance_manager",
        "//cuttlefish/host/commands/cvd/utils",
        "//cuttlefish/result",
        "@abseil-cpp//absl/strings",
    ],
)

cf_cc_library(
    name = "env",
    srcs = ["env.cpp"],
    hdrs = ["env.h"],
    deps = [
        "//cuttlefish/common/libs/utils:subprocess",
        "//cuttlefish/common/libs/utils:subprocess_managed_stdio",
        "//cuttlefish/flag_parser",
        "//cuttlefish/host/commands/cvd/cli:command_request",
        "//cuttlefish/host/commands/cvd/cli:types",
        "//cuttlefish/host/commands/cvd/cli:utils",
        "//cuttlefish/host/commands/cvd/cli/commands:command_handler",
        "//cuttlefish/host/commands/cvd/cli/selector",
        "//cuttlefish/host/commands/cvd/instances",
        "//cuttlefish/host/commands/cvd/instances:instance_manager",
        "//cuttlefish/host/commands/cvd/utils",
        "//cuttlefish/result",
        "//libbase",
        "@abseil-cpp//absl/strings",
        "@fmt",
    ],
)

cf_cc_library(
    name = "fetch",
    srcs = ["fetch.cpp"],
    hdrs = ["fetch.h"],
    deps = [
        "//cuttlefish/common/libs/utils:files",
        "//cuttlefish/common/libs/utils:tee_logging",
        "//cuttlefish/host/commands/cvd/cache",
        "//cuttlefish/host/commands/cvd/cli:command_request",
        "//cuttlefish/host/commands/cvd/cli:types",
        "//cuttlefish/host/commands/cvd/cli/commands:command_handler",
        "//cuttlefish/host/commands/cvd/fetch:auto_login",
        "//cuttlefish/host/commands/cvd/fetch:build_api_flags",
        "//cuttlefish/host/commands/cvd/fetch:fetch_cvd",
        "//cuttlefish/host/commands/cvd/fetch:fetch_cvd_parser",
        "//cuttlefish/host/commands/cvd/utils",
        "//cuttlefish/host/commands/cvd/utils:common",
        "//cuttlefish/host/libs/metrics:fetch_metrics_orchestration",
        "//cuttlefish/result",
        "//libbase",
        "@abseil-cpp//absl/log",
        "@fmt",
    ],
)

cf_cc_library(
    name = "fleet",
    srcs = ["fleet.cpp"],
    hdrs = ["fleet.h"],
    deps = [
        "//cuttlefish/flag_parser",
        "//cuttlefish/host/commands/cvd/cli:command_request",
        "//cuttlefish/host/commands/cvd/cli:types",
        "//cuttlefish/host/commands/cvd/cli/commands:command_handler",
        "//cuttlefish/host/commands/cvd/instances",
        "//cuttlefish/host/commands/cvd/instances:instance_manager",
        "//cuttlefish/result",
        "//libbase",
        "@jsoncpp",
    ],
)

cf_cc_library(
    name = "host_tool_target",
    srcs = ["host_tool_target.cpp"],
    hdrs = ["host_tool_target.h"],
    clang_format_enabled = False,
    deps = [
        "//cuttlefish/common/libs/utils:files",
        "//cuttlefish/common/libs/utils:subprocess",
        "//cuttlefish/common/libs/utils:subprocess_managed_stdio",
        "//cuttlefish/host/commands/cvd/utils",
        "//cuttlefish/result",
        "//libbase",
        "@abseil-cpp//absl/strings",
        "@fmt",
    ],
)

cf_cc_library(
    name = "lint",
    srcs = ["lint.cpp"],
    hdrs = ["lint.h"],
    deps = [
        "//cuttlefish/flag_parser",
        "//cuttlefish/host/commands/cvd/cli:command_request",
        "//cuttlefish/host/commands/cvd/cli:types",
        "//cuttlefish/host/commands/cvd/cli/commands:command_handler",
        "//cuttlefish/host/commands/cvd/cli/parser:load_configs_parser",
        "//cuttlefish/result",
    ],
)

cf_cc_library(
    name = "login",
    srcs = ["login.cpp"],
    hdrs = ["login.h"],
    clang_format_enabled = False,
    deps = [
        "//cuttlefish/common/libs/utils:environment",
        "//cuttlefish/common/libs/utils:is_google_corp",
        "//cuttlefish/flag_parser",
        "//cuttlefish/host/commands/cvd/cli:command_request",
        "//cuttlefish/host/commands/cvd/cli:types",
        "//cuttlefish/host/commands/cvd/cli/commands:command_handler",
        "//cuttlefish/host/libs/web:oauth2_consent",
        "//cuttlefish/host/libs/web/http_client",
        "//cuttlefish/host/libs/web/http_client:curl_global_init",
        "//cuttlefish/host/libs/web/http_client:curl_http_client",
        "//cuttlefish/result",
        "//libbase",
        "@abseil-cpp//absl/strings",
        "@zlib",
    ],
)

cf_cc_library(
    name = "logs",
    srcs = ["logs.cpp"],
    hdrs = ["logs.h"],
    deps = [
        "//cuttlefish/flag_parser",
        "//cuttlefish/host/commands/cvd/cli:command_request",
        "//cuttlefish/host/commands/cvd/cli:types",
        "//cuttlefish/host/commands/cvd/cli/commands:command_handler",
        "//cuttlefish/host/commands/cvd/cli/selector",
        "//cuttlefish/host/commands/cvd/instances:instance_manager",
        "//cuttlefish/result",
        "//libbase",
        "@abseil-cpp//absl/log",
    ],
)

cf_cc_library(
    name = "power_btn",
    srcs = ["power_btn.cpp"],
    hdrs = ["power_btn.h"],
    clang_format_enabled = False,
    deps = [
        "//cuttlefish/flag_parser",
        "//cuttlefish/host/commands/cvd/cli:command_request",
        "//cuttlefish/host/commands/cvd/cli:types",
        "//cuttlefish/host/commands/cvd/cli/commands:command_handler",
        "//cuttlefish/host/commands/cvd/cli/selector",
        "//cuttlefish/host/commands/cvd/instances",
        "//cuttlefish/host/commands/cvd/instances:instance_manager",
        "//cuttlefish/result",
        "//libbase",
        "@fmt",
    ],
)

cf_cc_library(
    name = "powerwash",
    srcs = ["powerwash.cpp"],
    hdrs = ["powerwash.h"],
    deps = [
        "//cuttlefish/flag_parser",
        "//cuttlefish/host/commands/cvd/cli:command_request",
        "//cuttlefish/host/commands/cvd/cli:types",
        "//cuttlefish/host/commands/cvd/cli/commands:command_handler",
        "//cuttlefish/host/commands/cvd/cli/selector",
        "//cuttlefish/host/commands/cvd/instances",
        "//cuttlefish/host/commands/cvd/instances:instance_manager",
        "//cuttlefish/result",
        "//libbase",
        "@fmt",
    ],
)

cf_cc_library(
    name = "remove",
    srcs = ["remove.cpp"],
    hdrs = ["remove.h"],
    deps = [
        "//cuttlefish/flag_parser",
        "//cuttlefish/host/commands/cvd/cli:command_request",
        "//cuttlefish/host/commands/cvd/cli:types",
        "//cuttlefish/host/commands/cvd/cli:utils",
        "//cuttlefish/host/commands/cvd/cli/commands:command_handler",
        "//cuttlefish/host/commands/cvd/cli/selector",
        "//cuttlefish/host/commands/cvd/instances",
        "//cuttlefish/host/commands/cvd/instances:instance_manager",
        "//cuttlefish/result",
        "//libbase",
        "@abseil-cpp//absl/log",
    ],
)

cf_cc_library(
    name = "reset",
    srcs = ["reset.cpp"],
    hdrs = ["reset.h"],
    deps = [
        "//cuttlefish/common/libs/utils:files",
        "//cuttlefish/flag_parser",
        "//cuttlefish/host/commands/cvd/cli:command_request",
        "//cuttlefish/host/commands/cvd/cli:types",
        "//cuttlefish/host/commands/cvd/cli/commands:command_handler",
        "//cuttlefish/host/commands/cvd/instances",
        "//cuttlefish/host/commands/cvd/instances:instance_manager",
        "//cuttlefish/host/commands/cvd/utils",
        "//cuttlefish/result",
        "//libbase",
    ],
)

cf_cc_library(
    name = "restart",
    srcs = ["restart.cpp"],
    hdrs = ["restart.h"],
    deps = [
        "//cuttlefish/flag_parser",
        "//cuttlefish/host/commands/cvd/cli:command_request",
        "//cuttlefish/host/commands/cvd/cli:types",
        "//cuttlefish/host/commands/cvd/cli/commands:command_handler",
        "//cuttlefish/host/commands/cvd/cli/selector",
        "//cuttlefish/host/commands/cvd/instances",
        "//cuttlefish/host/commands/cvd/instances:instance_manager",
        "//cuttlefish/result",
        "//libbase",
        "@fmt",
    ],
)

cf_cc_library(
    name = "screen_recording",
    srcs = ["screen_recording.cpp"],
    hdrs = ["screen_recording.h"],
    deps = [
        "//cuttlefish/flag_parser",
        "//cuttlefish/host/commands/cvd/cli:command_request",
        "//cuttlefish/host/commands/cvd/cli:types",
        "//cuttlefish/host/commands/cvd/cli/commands:command_handler",
        "//cuttlefish/host/commands/cvd/cli/selector",
        "//cuttlefish/host/commands/cvd/instances",
        "//cuttlefish/host/commands/cvd/instances:instance_manager",
        "//cuttlefish/result",
        "//libbase",
        "@abseil-cpp//absl/log",
        "@fmt",
        "@jsoncpp",
    ],
)

cf_cc_library(
    name = "snapshot",
    srcs = ["snapshot.cpp"],
    hdrs = ["snapshot.h"],
    deps = [
        "//cuttlefish/common/libs/utils:files",
        "//cuttlefish/common/libs/utils:subprocess",
        "//cuttlefish/host/commands/cvd/cli:command_request",
        "//cuttlefish/host/commands/cvd/cli:types",
        "//cuttlefish/host/commands/cvd/cli:utils",
        "//cuttlefish/host/commands/cvd/cli/commands:command_handler",
        "//cuttlefish/host/commands/cvd/cli/commands:host_tool_target",
        "//cuttlefish/host/commands/cvd/cli/selector",
        "//cuttlefish/host/commands/cvd/instances",
        "//cuttlefish/host/commands/cvd/instances:instance_manager",
        "//cuttlefish/host/commands/cvd/utils",
        "//cuttlefish/result",
        "//libbase",
        "@abseil-cpp//absl/log",
    ],
)

cf_cc_library(
    name = "start",
    srcs = ["start.cpp"],
    hdrs = ["start.h"],
    clang_format_enabled = False,
    deps = [
        "//cuttlefish/common/libs/utils:contains",
        "//cuttlefish/common/libs/utils:files",
        "//cuttlefish/common/libs/utils:json",
        "//cuttlefish/common/libs/utils:subprocess",
        "//cuttlefish/common/libs/utils:subprocess_managed_stdio",
        "//cuttlefish/common/libs/utils:users",
        "//cuttlefish/flag_parser",
        "//cuttlefish/host/commands/cvd/cli:command_request",
        "//cuttlefish/host/commands/cvd/cli:help_format",
        "//cuttlefish/host/commands/cvd/cli:types",
        "//cuttlefish/host/commands/cvd/cli:utils",
        "//cuttlefish/host/commands/cvd/cli/commands:command_handler",
        "//cuttlefish/host/commands/cvd/cli/commands:host_tool_target",
        "//cuttlefish/host/commands/cvd/cli/selector",
        "//cuttlefish/host/commands/cvd/fetch:substitute",
        "//cuttlefish/host/commands/cvd/instances",
        "//cuttlefish/host/commands/cvd/instances:cvd_persistent_data",
        "//cuttlefish/host/commands/cvd/instances:instance_manager",
        "//cuttlefish/host/commands/cvd/instances:stop",
        "//cuttlefish/host/commands/cvd/instances/lock",
        "//cuttlefish/host/commands/cvd/utils",
        "//cuttlefish/host/libs/config:config_constants",
        "//cuttlefish/host/libs/config:cuttlefish_config",
        "//cuttlefish/host/libs/metrics:device_metrics_orchestration",
        "//cuttlefish/posix:symlink",
        "//cuttlefish/result",
        "//libbase",
        "@abseil-cpp//absl/log",
        "@abseil-cpp//absl/strings",
        "@fmt",
    ],
)

cf_cc_library(
    name = "status",
    srcs = ["status.cpp"],
    hdrs = ["status.h"],
    deps = [
        "//cuttlefish/flag_parser",
        "//cuttlefish/host/commands/cvd/cli:command_request",
        "//cuttlefish/host/commands/cvd/cli:types",
        "//cuttlefish/host/commands/cvd/cli:utils",
        "//cuttlefish/host/commands/cvd/cli/commands:command_handler",
        "//cuttlefish/host/commands/cvd/cli/selector",
        "//cuttlefish/host/commands/cvd/instances",
        "//cuttlefish/host/commands/cvd/instances:instance_manager",
        "//cuttlefish/host/libs/config:config_constants",
        "//cuttlefish/result",
        "//libbase",
        "@abseil-cpp//absl/strings",
        "@fmt",
        "@jsoncpp",
    ],
)

cf_cc_library(
    name = "stop",
    srcs = ["stop.cpp"],
    hdrs = ["stop.h"],
    deps = [
        "//cuttlefish/flag_parser",
        "//cuttlefish/host/commands/cvd/cli:command_request",
        "//cuttlefish/host/commands/cvd/cli:types",
        "//cuttlefish/host/commands/cvd/cli:utils",
        "//cuttlefish/host/commands/cvd/cli/commands:command_handler",
        "//cuttlefish/host/commands/cvd/cli/commands:host_tool_target",
        "//cuttlefish/host/commands/cvd/cli/selector",
        "//cuttlefish/host/commands/cvd/instances",
        "//cuttlefish/host/commands/cvd/instances:instance_manager",
        "//cuttlefish/host/commands/cvd/utils",
        "//cuttlefish/host/libs/metrics:device_metrics_orchestration",
        "//cuttlefish/result",
        "//libbase",
        "@abseil-cpp//absl/strings",
    ],
)

cf_cc_library(
    name = "version",
    srcs = ["version.cpp"],
    hdrs = ["version.h"],
    clang_format_enabled = False,
    deps = [
        "//cuttlefish/common/libs/utils:proto",
        "//cuttlefish/flag_parser",
        "//cuttlefish/host/commands/cvd/cli:command_request",
        "//cuttlefish/host/commands/cvd/cli:types",
        "//cuttlefish/host/commands/cvd/cli/commands:command_handler",
        "//cuttlefish/host/commands/cvd/utils",
        "//cuttlefish/host/commands/cvd/version",
        "//cuttlefish/result",
        "@fmt",
        "@jsoncpp",
    ],
)

cf_cc_library(
    name = "setup",
    srcs = ["setup.cc"],
    hdrs = ["setup.h"],
    clang_format_enabled = False,
    deps = [
        "//cuttlefish/common/libs/utils:subprocess",
        "//cuttlefish/host/commands/cvd/cli:command_request",
        "//cuttlefish/host/commands/cvd/cli:types",
        "//cuttlefish/host/commands/cvd/cli/commands:command_handler",
        "//cuttlefish/host/libs/vm_manager",
        "//cuttlefish/result",
        "@abseil-cpp//absl/strings",
    ],
)
