Skip to content

Commit 6870b08

Browse files
author
Emmanuel Garcia
authored
Exclude null-safe plugins from testing on stable (flutter#3318)
1 parent 298fb23 commit 6870b08

File tree

3 files changed

+34
-4
lines changed

3 files changed

+34
-4
lines changed

script/build_all_plugins_app.sh

+11-1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ readonly SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" > /dev/null && pwd)"
88
readonly REPO_DIR="$(dirname "$SCRIPT_DIR")"
99

1010
source "$SCRIPT_DIR/common.sh"
11+
source "$SCRIPT_DIR/nnbd_plugins.sh"
12+
1113
check_changed_packages > /dev/null
1214

1315
readonly EXCLUDED_PLUGINS_LIST=(
@@ -42,7 +44,15 @@ readonly EXCLUDED_PLUGINS_LIST=(
4244
# Comma-separated string of the list above
4345
readonly EXCLUDED=$(IFS=, ; echo "${EXCLUDED_PLUGINS_LIST[*]}")
4446

45-
(cd "$REPO_DIR" && pub global run flutter_plugin_tools all-plugins-app --exclude $EXCLUDED)
47+
ALL_EXCLUDED=($EXCLUDED)
48+
# Exclude nnbd plugins from stable.
49+
if [[ "$CHANNEL" -eq "stable" ]]; then
50+
ALL_EXCLUDED=("$EXCLUDED,$EXCLUDED_PLUGINS_FROM_STABLE")
51+
fi
52+
53+
echo "Excluding the following plugins: $ALL_EXCLUDED"
54+
55+
(cd "$REPO_DIR" && pub global run flutter_plugin_tools all-plugins-app --exclude $ALL_EXCLUDED)
4656

4757
function error() {
4858
echo "$@" 1>&2

script/incremental_build.sh

+12-3
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,22 @@ readonly SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null && pwd)"
55
readonly REPO_DIR="$(dirname "$SCRIPT_DIR")"
66

77
source "$SCRIPT_DIR/common.sh"
8+
source "$SCRIPT_DIR/nnbd_plugins.sh"
89

910
if [ "$(expr substr $(uname -s) 1 5)" == "MINGW" ]; then
1011
PUB=pub.bat
1112
else
1213
PUB=pub
1314
fi
1415

16+
# Plugins that are excluded from this task.
17+
ALL_EXCLUDED=("")
18+
# Exclude nnbd plugins from stable.
19+
if [[ "$CHANNEL" -eq "stable" ]]; then
20+
ALL_EXCLUDED=($EXCLUDED_PLUGINS_FROM_STABLE)
21+
echo "Excluding the following plugins: $ALL_EXCLUDED"
22+
fi
23+
1524
# Plugins that deliberately use their own analysis_options.yaml.
1625
#
1726
# This list should only be deleted from, never added to. This only exists
@@ -39,18 +48,18 @@ PLUGIN_SHARDING=($PLUGIN_SHARDING)
3948

4049
if [[ "${BRANCH_NAME}" == "master" ]]; then
4150
echo "Running for all packages"
42-
(cd "$REPO_DIR" && $PUB global run flutter_plugin_tools "${ACTIONS[@]}" ${PLUGIN_SHARDING[@]})
51+
(cd "$REPO_DIR" && $PUB global run flutter_plugin_tools "${ACTIONS[@]}" --exclude="$ALL_EXCLUDED" ${PLUGIN_SHARDING[@]})
4352
else
4453
# Sets CHANGED_PACKAGES
4554
check_changed_packages
4655

4756
if [[ "$CHANGED_PACKAGES" == "" ]]; then
4857
echo "No changes detected in packages."
4958
echo "Running for all packages"
50-
(cd "$REPO_DIR" && $PUB global run flutter_plugin_tools "${ACTIONS[@]}" ${PLUGIN_SHARDING[@]})
59+
(cd "$REPO_DIR" && $PUB global run flutter_plugin_tools "${ACTIONS[@]}" --exclude="$ALL_EXCLUDED" ${PLUGIN_SHARDING[@]})
5160
else
5261
echo running "${ACTIONS[@]}"
53-
(cd "$REPO_DIR" && $PUB global run flutter_plugin_tools "${ACTIONS[@]}" --plugins="$CHANGED_PACKAGES" ${PLUGIN_SHARDING[@]})
62+
(cd "$REPO_DIR" && $PUB global run flutter_plugin_tools "${ACTIONS[@]}" --plugins="$CHANGED_PACKAGES" --exclude="$ALL_EXCLUDED" ${PLUGIN_SHARDING[@]})
5463
echo "Running version check for changed packages"
5564
(cd "$REPO_DIR" && $PUB global run flutter_plugin_tools version-check --base_sha="$(get_branch_base_sha)")
5665
fi

script/nnbd_plugins.sh

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#!/bin/bash
2+
3+
# This script contains the list of plugins migrated to nnbd
4+
# that should be excluded from testing on Flutter stable until
5+
# null-safe is available on stable.
6+
7+
readonly NNBD_PLUGINS_LIST=(
8+
"flutter_webview"
9+
)
10+
11+
export EXCLUDED_PLUGINS_FROM_STABLE=$(IFS=, ; echo "${NNBD_PLUGINS_LIST[*]}")

0 commit comments

Comments
 (0)