@@ -6,6 +6,10 @@ only_if: $CIRRUS_TAG == ''
66env :
77 CHANNEL : " master" # Default to master when not explicitly set by a task.
88 PLUGIN_TOOL : " ./script/tool/bin/flutter_plugin_tools.dart"
9+ # The base command flags for most tool invocations, handling:
10+ # - running the correct set of packages for the current branch
11+ # - including any sharding that is configured for a task via $PLUGIN_SHARDING
12+ COMMON_FLAGS : --packages-for-branch $PLUGIN_SHARDING
913
1014tool_setup_template : &TOOL_SETUP_TEMPLATE
1115 tool_setup_script :
@@ -68,19 +72,19 @@ task:
6872 - cd script/tool
6973 - CIRRUS_BUILD_ID=null pub run test
7074 - name : publishable
71- version_check_script : ./script/tool_runner.sh version-check
72- publish_check_script : ./script/tool_runner.sh publish-check
75+ version_check_script : dart $PLUGIN_TOOL version-check $COMMON_FLAGS
76+ publish_check_script : dart $PLUGIN_TOOL publish-check $COMMON_FLAGS
7377 - name : format
74- format_script : ./script/tool_runner.sh format --fail-on-change
75- pubspec_script : ./script/tool_runner.sh pubspec-check
78+ format_script : dart $PLUGIN_TOOL format --fail-on-change $COMMON_FLAGS
79+ pubspec_script : dart $PLUGIN_TOOL pubspec-check $COMMON_FLAGS
7680 license_script : dart $PLUGIN_TOOL license-check
7781 - name : test
7882 env :
7983 matrix :
8084 CHANNEL : " master"
8185 CHANNEL : " stable"
8286 test_script :
83- - ./script/tool_runner.sh test
87+ - dart $PLUGIN_TOOL test $COMMON_FLAGS
8488 - name : analyze
8589 env :
8690 matrix :
9094 - cd script/tool
9195 - dart analyze --fatal-infos
9296 script :
93- # DO NOT change the custom-analysis argument here without changing the Dart repo.
97+ # DO NOT change anything about this command without changing the
98+ # dart-lang/sdk and flutter/flutter repositories first.
9499 # See the comment in script/configs/custom_analysis.yaml for details.
100+ # This deliberately still uses tool_runner.sh to ensure that changes
101+ # that would cause this command to fail show up here, not in the other
102+ # repositories.
95103 - ./script/tool_runner.sh analyze --custom-analysis=script/configs/custom_analysis.yaml
96104 # ## Android tasks ###
97105 - name : build_all_plugins_apk
@@ -126,9 +134,9 @@ task:
126134 CHANNEL : " stable"
127135 build_script :
128136 - flutter config --enable-linux-desktop
129- - ./script/tool_runner.sh build-examples --linux
137+ - dart $PLUGIN_TOOL build-examples --linux $COMMON_FLAGS
130138 drive_script :
131- - xvfb-run ./script/tool_runner.sh drive-examples --linux
139+ - xvfb-run dart $PLUGIN_TOOL drive-examples --linux $COMMON_FLAGS
132140
133141# Heavy-workload Linux tasks.
134142# These use machines with more CPUs and memory, so will reduce parallelization
@@ -164,14 +172,15 @@ task:
164172 # TODO(stuartmorgan): See https://github.com/flutter/flutter/issues/24935
165173 - export CIRRUS_CHANGE_MESSAGE=""
166174 - export CIRRUS_COMMIT_MESSAGE=""
167- - ./script/tool_runner.sh build-examples --apk
175+ - dart $PLUGIN_TOOL build-examples --apk $COMMON_FLAGS
168176 lint_script :
169177 # Unsetting CIRRUS_CHANGE_MESSAGE and CIRRUS_COMMIT_MESSAGE as they
170178 # might include non-ASCII characters which makes Gradle crash.
171179 # TODO(stuartmorgan): See https://github.com/flutter/flutter/issues/24935
172180 - export CIRRUS_CHANGE_MESSAGE=""
173181 - export CIRRUS_COMMIT_MESSAGE=""
174- - ./script/tool_runner.sh lint-android # must come after build-examples
182+ # Must come after build-examples.
183+ - dart $PLUGIN_TOOL lint-android $COMMON_FLAGS
175184 native_unit_test_script :
176185 # Unsetting CIRRUS_CHANGE_MESSAGE and CIRRUS_COMMIT_MESSAGE as they
177186 # might include non-ASCII characters which makes Gradle crash.
@@ -180,7 +189,8 @@ task:
180189 - export CIRRUS_COMMIT_MESSAGE=""
181190 # Native integration tests are handled by firebase-test-lab below, so
182191 # only run unit tests.
183- - ./script/tool_runner.sh native-test --android --no-integration # must come after apk build
192+ # Must come after build-examples.
193+ - dart $PLUGIN_TOOL native-test --android --no-integration $COMMON_FLAGS
184194 firebase_test_lab_script :
185195 # Unsetting CIRRUS_CHANGE_MESSAGE and CIRRUS_COMMIT_MESSAGE as they
186196 # might include non-ASCII characters which makes Gradle crash.
@@ -189,7 +199,7 @@ task:
189199 - export CIRRUS_COMMIT_MESSAGE=""
190200 - if [[ -n "$GCLOUD_FIREBASE_TESTLAB_KEY" ]]; then
191201 - echo $GCLOUD_FIREBASE_TESTLAB_KEY > ${HOME}/gcloud-service-key.json
192- - ./script/tool_runner.sh firebase-test-lab --device model=flame,version=29 --device model=starqlteue,version=26 --exclude=script/configs/exclude_integration_android.yaml
202+ - dart $PLUGIN_TOOL firebase-test-lab --device model=flame,version=29 --device model=starqlteue,version=26 --exclude=script/configs/exclude_integration_android.yaml $COMMON_FLAGS
193203 - else
194204 - echo "This user does not have permission to run Firebase Test Lab tests."
195205 - fi
@@ -212,9 +222,9 @@ task:
212222 - dart lib/web_driver_installer.dart chromedriver --install-only
213223 - ./chromedriver/chromedriver --port=4444 &
214224 build_script :
215- - ./script/tool_runner.sh build-examples --web
225+ - dart $PLUGIN_TOOL build-examples --web $COMMON_FLAGS
216226 drive_script :
217- - ./script/tool_runner.sh drive-examples --web --exclude=script/configs/exclude_integration_web.yaml
227+ - dart $PLUGIN_TOOL drive-examples --web --exclude=script/configs/exclude_integration_web.yaml $COMMON_FLAGS
218228
219229# macOS tasks.
220230task :
@@ -224,7 +234,7 @@ task:
224234 # ## iOS+macOS tasks ***
225235 - name : lint_darwin_plugins
226236 script :
227- - ./script/tool_runner.sh podspecs
237+ - dart $PLUGIN_TOOL podspecs $COMMON_FLAGS
228238 # ## iOS tasks ###
229239 - name : build_all_plugins_ipa
230240 env :
@@ -249,16 +259,16 @@ task:
249259 - xcrun simctl list
250260 - xcrun simctl create Flutter-iPhone com.apple.CoreSimulator.SimDeviceType.iPhone-11 com.apple.CoreSimulator.SimRuntime.iOS-14-5 | xargs xcrun simctl boot
251261 build_script :
252- - ./script/tool_runner.sh build-examples --ios
262+ - dart $PLUGIN_TOOL build-examples --ios $COMMON_FLAGS
253263 xcode_analyze_script :
254- - ./script/tool_runner.sh xcode-analyze --ios
264+ - dart $PLUGIN_TOOL xcode-analyze --ios $COMMON_FLAGS
255265 native_test_script :
256- - ./script/tool_runner.sh native-test --ios --ios-destination "platform=iOS Simulator,name=iPhone 11,OS=latest"
266+ - dart $PLUGIN_TOOL native-test --ios --ios-destination "platform=iOS Simulator,name=iPhone 11,OS=latest" $COMMON_FLAGS
257267 drive_script :
258268 # `drive-examples` contains integration tests, which changes the UI of the application.
259269 # This UI change sometimes affects `xctest`.
260270 # So we run `drive-examples` after `native-test`; changing the order will result ci failure.
261- - ./script/tool_runner.sh drive-examples --ios --exclude=script/configs/exclude_integration_ios.yaml
271+ - dart $PLUGIN_TOOL drive-examples --ios --exclude=script/configs/exclude_integration_ios.yaml $COMMON_FLAGS
262272 # ## macOS desktop tasks ###
263273 - name : build_all_plugins_macos
264274 env :
@@ -277,10 +287,10 @@ task:
277287 PATH : $PATH:/usr/local/bin
278288 build_script :
279289 - flutter config --enable-macos-desktop
280- - ./script/tool_runner.sh build-examples --macos
290+ - dart $PLUGIN_TOOL build-examples --macos $COMMON_FLAGS
281291 xcode_analyze_script :
282- - ./script/tool_runner.sh xcode-analyze --macos
292+ - dart $PLUGIN_TOOL xcode-analyze --macos $COMMON_FLAGS
283293 native_test_script :
284- - ./script/tool_runner.sh native-test --macos --exclude=script/configs/exclude_native_macos.yaml
294+ - dart $PLUGIN_TOOL native-test --macos --exclude=script/configs/exclude_native_macos.yaml $COMMON_FLAGS
285295 drive_script :
286- - ./script/tool_runner.sh drive-examples --macos
296+ - dart $PLUGIN_TOOL drive-examples --macos $COMMON_FLAGS
0 commit comments