From e8a2845bc70193fa3839e0c472aaabfbee9aeda7 Mon Sep 17 00:00:00 2001 From: Stuart Morgan Date: Mon, 16 Mar 2026 16:55:33 -0400 Subject: [PATCH] [ci] Enable SwiftPM by default for platform tests Rather than continue to plumb `--swift-package-manager` support into every command to make CI work on stable, just enable it at the machine level before running platform tests so that they all use Swift Package Manager, making `stable` and `master` act the same for these tasks. The build-all tests are not changed, as they continue to be the testbed for ensuring that plugins are usable by clients who are using CocoaPods. A recipe step runs `flutter config --clear-features` at the start of any bot's run, so this should not cause cross-task bot contamination. --- .ci/scripts/enable_swift_package_manager.sh | 7 +++++++ .ci/targets/ios_platform_tests.yaml | 4 ++++ .ci/targets/macos_platform_tests.yaml | 4 ++++ 3 files changed, 15 insertions(+) create mode 100755 .ci/scripts/enable_swift_package_manager.sh diff --git a/.ci/scripts/enable_swift_package_manager.sh b/.ci/scripts/enable_swift_package_manager.sh new file mode 100755 index 000000000000..d8d789e7da95 --- /dev/null +++ b/.ci/scripts/enable_swift_package_manager.sh @@ -0,0 +1,7 @@ +#!/bin/bash +# Copyright 2013 The Flutter Authors +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. +set -e + +flutter config --enable-swift-package-manager diff --git a/.ci/targets/ios_platform_tests.yaml b/.ci/targets/ios_platform_tests.yaml index 08eaaf54c15a..4e10a6f091b7 100644 --- a/.ci/targets/ios_platform_tests.yaml +++ b/.ci/targets/ios_platform_tests.yaml @@ -2,6 +2,10 @@ tasks: - name: prepare tool script: .ci/scripts/prepare_tool.sh infra_step: true # Note infra steps failing prevents "always" from running. + - name: enable Swift Package Manager + # For consistency between stable and master channels, enable SwiftPM. + # TODO(stuartmorgan): Remove this step once it's the default on stable. + script: .ci/scripts/enable_swift_package_manager.sh - name: create simulator script: .ci/scripts/create_simulator.sh infra_step: true # Note infra steps failing prevents "always" from running. diff --git a/.ci/targets/macos_platform_tests.yaml b/.ci/targets/macos_platform_tests.yaml index ab8b033d09c6..fd2a1767cc2f 100644 --- a/.ci/targets/macos_platform_tests.yaml +++ b/.ci/targets/macos_platform_tests.yaml @@ -2,6 +2,10 @@ tasks: - name: prepare tool script: .ci/scripts/prepare_tool.sh infra_step: true # Note infra steps failing prevents "always" from running. + - name: enable Swift Package Manager + # For consistency between stable and master channels, enable SwiftPM. + # TODO(stuartmorgan): Remove this step once it's the default on stable. + script: .ci/scripts/enable_swift_package_manager.sh - name: download Dart and macOS deps script: .ci/scripts/tool_runner.sh args: ["fetch-deps", "--macos", "--supporting-target-platforms-only", "--swift-package-manager"]