| # Copyright 2022 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. |
| |
| load("@rules_fuchsia//flutter:defs.bzl", "dart_application", "dart_package") |
| load( |
| "@rules_fuchsia//fuchsia:defs.bzl", |
| "fuchsia_component", |
| "fuchsia_component_manifest", |
| "fuchsia_package_resource", |
| ) |
| |
| dart_package( |
| name = "pkg", |
| package_name = "hello_world_dart", |
| srcs = glob(["lib/**/*.dart"]), |
| ) |
| |
| dart_application( |
| name = "app", |
| application_name = "dart", |
| dart_pkg = ":pkg", |
| script_file = "lib/main.dart", |
| ) |
| |
| fuchsia_component_manifest( |
| name = "manifest", |
| src = "meta/dart.cml", |
| ) |
| |
| fuchsia_package_resource( |
| name = "resource", |
| src = "resources/hello.txt", |
| dest = "data/hello.txt", |
| ) |
| |
| fuchsia_component( |
| name = "dart", |
| manifest = ":manifest", |
| visibility = [ |
| "//src/examples/hello_workstation:__pkg__", |
| ], |
| deps = [ |
| ":app", |
| ":resource", |
| ], |
| ) |