From f8f07f4f60acd40fc7a3039d1471d0f87755d458 Mon Sep 17 00:00:00 2001 From: William Hesse Date: Tue, 19 Jul 2022 19:02:55 +0200 Subject: [PATCH] [infra] Support archiving the built Dart SDK in the non-prebuilt case (flutter/engine#34605) [infra] Support archiving the built Dart SDK in the non-prebuilt case Bug: https://github.com/flutter/flutter/issues/106494 --- engine/src/flutter/build/archives/BUILD.gn | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/engine/src/flutter/build/archives/BUILD.gn b/engine/src/flutter/build/archives/BUILD.gn index 030547f383..2282c2d457 100644 --- a/engine/src/flutter/build/archives/BUILD.gn +++ b/engine/src/flutter/build/archives/BUILD.gn @@ -167,6 +167,25 @@ if (build_engine_artifacts && flutter_prebuilt_dart_sdk) { } } +# If there is no prebuilt sdk, create the dart sdk archive from the built sdk. +if (build_engine_artifacts && !flutter_prebuilt_dart_sdk) { + zip_bundle_from_file("dart_sdk_archive") { + deps = [ "//third_party/dart:create_sdk" ] + output = "dart-sdk-$full_target_platform_name.zip" + if (is_mac) { + # Mac artifacts sometimes use mac and sometimes darwin. Standardizing the + # names will require changes in the list of artifacts the tool is downloading. + output = "dart-sdk-darwin-$target_cpu.zip" + } + files = [ + { + source = rebase_path("$root_build_dir/dart-sdk") + destination = "dart-sdk" + }, + ] + } +} + # Archives Flutter Web SDK if (!is_fuchsia) { group("flutter_web_sdk") {