Add Fuchsia package() declaration (#4239)

This declaration makes it easier for Fuchsia to include Flutter in the system
image.
This commit is contained in:
Adam Barth 2017-10-18 11:23:46 -07:00 committed by GitHub
parent 879c1fb8e1
commit 4c63032ed0

View File

@ -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",
@ -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",
@ -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",
@ -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