Skip to content

Commit

Permalink
Add Fuchsia package() declaration (flutter#4239)
Browse files Browse the repository at this point in the history
This declaration makes it easier for Fuchsia to include Flutter in the system
image.
  • Loading branch information
abarth authored Oct 18, 2017
1 parent 879c1fb commit 4c63032
Showing 1 changed file with 30 additions and 11 deletions.
41 changes: 30 additions & 11 deletions BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
group("flutter") {
testonly = true

deps = [
public_deps = [
"$flutter_root/lib/snapshot:compile_platform",
"$flutter_root/lib/snapshot:generate_snapshot_bin",
"$flutter_root/sky",
Expand All @@ -14,15 +14,15 @@ group("flutter") {

if (!is_fuchsia) {
if (current_toolchain == host_toolchain) {
deps += [
"//dart:create_sdk",
public_deps += [
"$flutter_root/frontend_server",
"//dart:create_sdk",
]
}
}

if (is_fuchsia) {
deps += [
public_deps += [
"$flutter_root/content_handler",
"$flutter_root/content_handler:aot_content_handler",
"$flutter_root/examples",
Expand All @@ -33,12 +33,13 @@ group("flutter") {
# If on the host, compile all unittests targets.
if (current_toolchain == host_toolchain) {
if (is_mac) {
deps += [ "$flutter_root/shell/platform/darwin:flutter_channels_unittests" ]
public_deps +=
[ "$flutter_root/shell/platform/darwin:flutter_channels_unittests" ]
}
if (!is_win) {
deps += [ "$flutter_root/shell/platform/embedder:flutter_engine" ]
public_deps += [ "$flutter_root/shell/platform/embedder:flutter_engine" ]
}
deps += [
public_deps += [
"$flutter_root/flow:flow_unittests",
"$flutter_root/fml:fml_unittests",
"$flutter_root/sky/engine/wtf:wtf_unittests",
Expand All @@ -51,12 +52,30 @@ group("flutter") {
}

config("config") {
include_dirs = [
"..",
]
include_dirs = [ ".." ]
}

if (!is_fuchsia) {
if (is_fuchsia) {
import("//packages/package.gni")

package("package") {
app = true
testonly = true

package_name = "flutter"

deps = [ ":flutter" ]

binaries = [
{
name = "flutter_runner"
},
{
name = "flutter_aot_runner"
},
]
}
} else {
group("dist") {
testonly = true

Expand Down

0 comments on commit 4c63032

Please sign in to comment.