| # Copyright 2020 The Fuchsia Authors. All rights reserved. | |
| # Use of this source code is governed by a BSD-style license that can be | |
| # found in the LICENSE file. | |
| import("//src/developer/ffx/build/ffx_plugin.gni") | |
| import("//src/developer/ffx/build/ffx_tool.gni") | |
| if (is_host) { | |
| ffx_plugin("ffx_component") { | |
| sdk_category = "not-yet-specified" | |
| version = "0.1.0" | |
| edition = "2024" | |
| plugin_deps = [ | |
| "capability:ffx_component_capability", | |
| "collection:ffx_component_collection", | |
| "config:ffx_component_config", | |
| "copy:ffx_component_copy", | |
| "create:ffx_component_create", | |
| "debug:ffx_component_debug", | |
| "destroy:ffx_component_destroy", | |
| "doctor:ffx_component_doctor", | |
| "explore:ffx_component_explore", | |
| "graph:ffx_component_graph", | |
| "list:ffx_component_list", | |
| "reload:ffx_component_reload", | |
| "resolve:ffx_component_resolve", | |
| "route:ffx_component_route", | |
| "run:ffx_component_run", | |
| "show:ffx_component_show", | |
| "start:ffx_component_start", | |
| "stop:ffx_component_stop", | |
| "storage:ffx_component_storage", | |
| ] | |
| args_sources = [ "src/args.rs" ] | |
| args_deps = [ | |
| "//src/developer/ffx/core:lib", | |
| "//third_party/rust_crates:argh", | |
| ] | |
| } | |
| ffx_tool("ffx_component_tool") { | |
| edition = "2024" | |
| output_name = "ffx-component" | |
| deps = [ | |
| ":ffx_component_suite", | |
| "//src/lib/fuchsia-async", | |
| ] | |
| sources = [ "src/main.rs" ] | |
| sdk_target_name = "sdk" | |
| sdk_category = "partner" | |
| } | |
| group("component") { | |
| public_deps = [ | |
| ":ffx_component_tool", | |
| ":ffx_component_tool_host_tool", | |
| ] | |
| } | |
| group("bin") { | |
| public_deps = [ ":ffx_component_tool_versioned" ] | |
| } | |
| } | |
| group("tests") { | |
| testonly = true | |
| deps = [ | |
| "common:ffx_component_test", | |
| "destroy:tests", | |
| "doctor:ffx_component_doctor_tests", | |
| "resolve:ffx_component_resolve_tests", | |
| "route:ffx_component_route_tests", | |
| "show:ffx_component_show_tests", | |
| "start:ffx_component_start_tests", | |
| # Bazel-migrated plugins | |
| "create:tests", | |
| "debug:tests", | |
| "graph:tests", | |
| "list:tests", | |
| "reload:tests", | |
| "stop:tests", | |
| "storage:tests", | |
| ] | |
| if (is_host) { | |
| deps += [ ":ffx_component_tests($host_toolchain)" ] | |
| } | |
| } | |
| if (is_host) { | |
| group("host_tests") { | |
| testonly = true | |
| deps = [ | |
| "create:host_tests", | |
| "destroy:host_tests", | |
| "run:host_tests", | |
| ] | |
| } | |
| } |