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

Commit 903809d

Browse files
authored
[Flutter GPU] Upload flutter_gpu.zip upon successful completion of ci/android_debug. (#53107)
Part of flutter/flutter#131711. Also, stops distributing `flutter_gpu` as part of the host artifacts, since it's not target-specific. This enables us to use the same distribution mechanism as the `sky_engine` package. Corresponding framework PR: flutter/flutter#149299
1 parent 2a9d2f5 commit 903809d

4 files changed

Lines changed: 54 additions & 6 deletions

File tree

BUILD.gn

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,10 @@ if (build_engine_artifacts) {
283283
group("dist") {
284284
testonly = true
285285

286-
deps = [ "//flutter/sky/dist" ]
286+
deps = [
287+
"//flutter/lib/gpu/dist",
288+
"//flutter/sky/dist",
289+
]
287290
}
288291

289292
if (is_fuchsia && enable_unittests) {

build/archives/BUILD.gn

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -87,10 +87,6 @@ if (build_engine_artifacts && !is_android) {
8787
source = "//flutter/impeller/compiler/shader_lib"
8888
destination = "shader_lib"
8989
},
90-
{
91-
source = "//flutter/lib/gpu"
92-
destination = "flutter_gpu"
93-
},
9490
{
9591
source = "$root_out_dir/${lib_prefix}path_ops$dll"
9692
destination = "${lib_prefix}path_ops$dll"

ci/builders/linux_android_debug_engine.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,8 @@
6868
"out/ci/android_debug/zip_archives/android-arm/symbols.zip",
6969
"out/ci/android_debug/zip_archives/download.flutter.io",
7070
"out/ci/android_debug/zip_archives/sky_engine.zip",
71-
"out/ci/android_debug/zip_archives/android-javadoc.zip"
71+
"out/ci/android_debug/zip_archives/android-javadoc.zip",
72+
"out/ci/android_debug/zip_archives/flutter_gpu.zip"
7273
],
7374
"realm": "production"
7475
}
@@ -96,6 +97,7 @@
9697
"targets": [
9798
"flutter",
9899
"flutter/sky/dist:zip_old_location",
100+
"flutter/lib/gpu/dist:zip_old_location",
99101
"flutter/shell/platform/android:embedding_jars",
100102
"flutter/shell/platform/android:abi_jars",
101103
"flutter/shell/platform/android:robolectric_tests"

lib/gpu/dist/BUILD.gn

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# Copyright 2013 The Flutter Authors. All rights reserved.
2+
# Use of this source code is governed by a BSD-style license that can be
3+
# found in the LICENSE file.
4+
5+
import("//flutter/build/zip_bundle.gni")
6+
7+
# Similar to `sky_engine`, zip up the `flutter_gpu` Dart package and upload
8+
# it to GCS for distribution. This is only done during Android builds on CI.
9+
#
10+
# Then, the Flutter tool downloads and extracts `flutter_gpu.zip` into the
11+
# package cache (`bin/cache/pkg`) during artifact initialization.
12+
#
13+
# Note that unlike with `sky_engine`, the `lib/gpu` directory is already a
14+
# complete Dart package. So no additional build steps are necessary beyond
15+
# zipping it up.
16+
17+
if (is_android) {
18+
zip_bundle("zip") {
19+
output = "$android_zip_archive_dir/flutter_gpu.zip"
20+
files = [
21+
{
22+
source = "//flutter/lib/gpu"
23+
destination = "flutter_gpu"
24+
},
25+
]
26+
deps = []
27+
}
28+
29+
zip_bundle("zip_old_location") {
30+
# TODO: remove after we migrate the tool to use the new location.
31+
# Bug: https://github.com/flutter/flutter/issues/105351
32+
output = "flutter_gpu.zip"
33+
files = [
34+
{
35+
source = "//flutter/lib/gpu"
36+
destination = "flutter_gpu"
37+
},
38+
]
39+
deps = []
40+
}
41+
}
42+
43+
group("dist") {
44+
if (is_android) {
45+
deps = [ ":zip" ]
46+
}
47+
}

0 commit comments

Comments
 (0)