blob: 93e836386931b135553297e5e40dc547eb8c7d97 [file] [log] [blame]
# 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("child-view2_dart_library") {
package_name = "child-view2"
source_dir = "."
sources = [ "child_view2.dart" ]
deps = []
}
flutter_component("child-view2_flutter_component") {
main_package = "child-view2"
component_name = "child-view2"
main_dart = "child_view2.dart"
manifest = rebase_path("meta/child-view2.cmx")
deps = [ ":child-view2_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("package") {
package_name = "child-view2"
deps = [ ":child-view2_flutter_component" ]
}