| # Copyright 2013 The Flutter 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("//build/fuchsia/sdk.gni") |
| import("//flutter/tools/fuchsia/dart/dart_library.gni") |
| import("//flutter/tools/fuchsia/flutter/flutter_component.gni") |
| import("//flutter/tools/fuchsia/gn-sdk/package.gni") |
| |
| dart_library("dart_library") { |
| testonly = true |
| package_name = "channel_test" |
| |
| language_version = "2.12" |
| |
| source_dir = "." |
| |
| sources = [ |
| "channel_test.dart", |
| "eventpair_test.dart", |
| "handle_disposition_test.dart", |
| "handle_test.dart", |
| "socket_test.dart", |
| "vmo_test.dart", |
| ] |
| |
| deps = [ |
| "//flutter/shell/platform/fuchsia/dart:litetest", |
| "//flutter/tools/fuchsia/dart:zircon", |
| ] |
| } |
| |
| flutter_component("channel_test_flutter_component") { |
| testonly = true |
| |
| main_package = "channel_test" |
| component_name = "channel_test" |
| main_dart = "channel_test.dart" |
| manifest = rebase_path("meta/channel_test.cml") |
| deps = [ ":dart_library" ] |
| } |
| |
| # TODO(richkadel): The target name is set differently compared to fuchsia.git's flutter_app(). |
| # Unlike in fuchsia.git's version of fuchsia_component, the Fuchsia GN SDK |
| # version passes the component name to fuchsia_component via it's target_name only. |
| # GN SDK's fuchsia_component doesn't have a `component_name` argument! So I'm forced to set |
| # the component name via "target_name". This is a problem in fuchsia_package, which uses |
| # the target_name to name the fuchsia_pm_tool target, creating duplicate target IDs! |
| # So I have to change the fuchsia_package name to something that is NOT the component name, |
| # and then set the package_name (which fuchsia_package does support). |
| fuchsia_package("channel_test_package") { |
| testonly = true |
| package_name = "channel_test" |
| deps = [ ":channel_test_flutter_component" ] |
| } |
| |
| group("test") { |
| testonly = true |
| deps = [ ":channel_test_package" ] |
| } |