Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

GN targets for generating release artifacts #30679

Merged
merged 8 commits into from
Jan 5, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion DEPS
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ allowed_hosts = [
]

deps = {
'src': 'https://github.com/flutter/buildroot.git' + '@' + '4660f4a166979c64ff56f6b856b44ccc1dba5c63',
'src': 'https://github.com/flutter/buildroot.git' + '@' + '6cd24973cdf055bea3aa1ec1a0c54f2ff9a3f192',

# Fuchsia compatibility
#
Expand Down
64 changes: 64 additions & 0 deletions build/archives/BUILD.gn
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
import("//flutter/build/zip_bundle.gni")

zip_bundle("artifacts") {
output = "$host_os-$target_cpu/artifacts.zip"
deps = [
"//flutter/flutter_frontend_server:frontend_server",
"//flutter/lib/snapshot:generate_snapshot_bin",
"//flutter/shell/testing:testing",
]
files = [
{
source = "//third_party/icu/flutter/icudtl.dat"
destination = "icudtl.dat"
},
{
source = "$root_out_dir/gen/flutter/lib/snapshot/isolate_snapshot.bin"
destination = "isolate_snapshot.bin"
},
{
source = "$root_gen_dir/flutter/lib/snapshot/vm_isolate_snapshot.bin"
destination = "vm_isolate_snapshot.bin"
},
{
source = "$root_gen_dir/frontend_server.dart.snapshot"
destination = "frontend_server.dart.snapshot"
},
]
if (host_os == "win") {
files += [
{
source = "$root_out_dir/flutter_tester.exe"
destination = "flutter_tester"
},
]
} else {
files += [
{
source = "$root_out_dir/flutter_tester"
destination = "flutter_tester"
},
]
}
}

if (host_os == "linux") {
group("linux-embedder") {
deps = [ "//flutter/shell/platform/embedder:linux-embedder-archive" ]
}
}

zip_bundle("flutter_patched_sdk") {
output = "flutter_patched_sdk.zip"
deps = [ "//flutter/lib/snapshot:strong_platform" ]
files = [
{
source = "$root_out_dir/flutter_patched_sdk/vm_outline_strong.dill"
destination = "vm_outline_strong.dill"
},
{
source = "$root_out_dir/flutter_patched_sdk/platform_strong.dill"
destination = "platform_strong.dill"
},
]
}
21 changes: 21 additions & 0 deletions shell/platform/embedder/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
# found in the LICENSE file.

import("//build/toolchain/clang.gni")
import("//flutter/build/zip_bundle.gni")
import("//flutter/common/config.gni")
import("//flutter/shell/gpu/gpu.gni")
import("//flutter/shell/platform/embedder/embedder.gni")
Expand Down Expand Up @@ -410,3 +411,23 @@ group("flutter_engine") {
}
}
}

if (host_os == "linux") {
zip_bundle("linux-embedder-archive") {
output = "${host_os}-${target_cpu}/${host_os}-${target_cpu}-embedder"
deps = [
"//flutter/shell/platform/embedder:copy_headers",
"//flutter/shell/platform/embedder:flutter_engine_library",
]
files = [
{
source = "$root_out_dir/flutter_embedder.h"
destination = "flutter_embedder.h"
},
{
source = "$root_out_dir/libflutter_engine.so"
destination = "libflutter_engine.so"
},
]
}
}
26 changes: 26 additions & 0 deletions shell/platform/linux/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

assert(is_linux)

import("//flutter/build/zip_bundle.gni")
import("//flutter/shell/platform/glfw/config.gni")
import("//flutter/testing/testing.gni")

Expand Down Expand Up @@ -244,3 +245,28 @@ copy("publish_headers_linux") {
sources = _public_headers
outputs = [ "$root_out_dir/flutter_linux/{{source_file_part}}" ]
}

zip_bundle("flutter_gtk") {
output = "$host_os-$target_cpu-flutter-gtk.zip"
deps = [
":flutter_linux_gtk",
":publish_headers_linux",
]
sources = get_target_outputs(":publish_headers_linux")
tmp_files = []
foreach(source, sources) {
tmp_files += [
{
source = source
destination = rebase_path(source, "$root_build_dir")
},
]
}
tmp_files += [
{
source = "$root_build_dir/libflutter_${host_os}_gtk.so"
destination = "libflutter_${host_os}_gtk.so"
},
]
files = tmp_files
}