From 114f8b84c13eb531372dee69ccf0dc3a1f2fb465 Mon Sep 17 00:00:00 2001 From: Emmanuel Garcia Date: Mon, 8 Feb 2021 13:16:12 -0800 Subject: [PATCH 1/4] Import the plugin tools directly --- .gitmodules | 3 +++ script/check_publish.sh | 3 +-- script/common.sh | 16 +++------------- script/plugin_tools | 1 + 4 files changed, 8 insertions(+), 15 deletions(-) create mode 100644 .gitmodules create mode 160000 script/plugin_tools diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 000000000000..0930750294f6 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "script/plugin_tools"] + path = script/plugin_tools + url = git@github.com:flutter/plugin_tools.git diff --git a/script/check_publish.sh b/script/check_publish.sh index 9f435e9ba42c..5584fc601916 100755 --- a/script/check_publish.sh +++ b/script/check_publish.sh @@ -12,8 +12,7 @@ source "$SCRIPT_DIR/common.sh" function check_publish() { local failures=() - pub_command global activate flutter_plugin_tools - for dir in $(pub_command global run flutter_plugin_tools list --plugins="$1"); do + for dir in $(plugin_tools list --plugins="$1"); do local package_name=$(basename "$dir") echo "Checking that $package_name can be published." diff --git a/script/common.sh b/script/common.sh index cd2c1ca3fd83..1287472c2611 100644 --- a/script/common.sh +++ b/script/common.sh @@ -46,18 +46,8 @@ function check_changed_packages() { return 0 } -# Normalizes the call to the pub command. -function pub_command() { - if [ "$(expr substr $(uname -s) 1 5)" == "MINGW" ]; then - pub.bat "$@" - else - pub "$@" - fi -} - -# Activates the Flutter plugin tool to ensures that the plugin tools dependencies -# are resolved using the current Dart SDK. -# Finally, runs the tool with the parameters. +# Runs the plugin tools from the plugin_tools git submodule. function plugin_tools() { - pub_command global activate flutter_plugin_tools && pub_command global run flutter_plugin_tools "$@" + (pushd "$REPO_DIR/script/plugin_tools" && pub get && popd) >/dev/null + dart run "$REPO_DIR/script/plugin_tools/lib/src/main.dart" "$@" } diff --git a/script/plugin_tools b/script/plugin_tools new file mode 160000 index 000000000000..432c56da3588 --- /dev/null +++ b/script/plugin_tools @@ -0,0 +1 @@ +Subproject commit 432c56da35880e95f6cbb02c40e9da0361771f48 From 7d1a94665f47adbc98f3a2d21a471657549cecbb Mon Sep 17 00:00:00 2001 From: Emmanuel Garcia Date: Mon, 8 Feb 2021 14:04:09 -0800 Subject: [PATCH 2/4] Init submodules --- .cirrus.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/.cirrus.yml b/.cirrus.yml index a4815ec2489e..a49a8b14ca83 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -14,6 +14,9 @@ task: - flutter channel master - flutter upgrade - git fetch origin master + submodules_script: + - git submodule init + - git submodule update matrix: - name: publishable script: @@ -121,6 +124,9 @@ task: - flutter channel master - flutter upgrade - git fetch origin master + submodules_script: + - git submodule init + - git submodule update matrix: - name: build-linux+drive-examples install_script: @@ -145,6 +151,9 @@ task: - flutter channel master - flutter upgrade - git fetch origin master + submodules_script: + - git submodule init + - git submodule update create_simulator_script: - xcrun simctl list - xcrun simctl create Flutter-iPhone com.apple.CoreSimulator.SimDeviceType.iPhone-11 com.apple.CoreSimulator.SimRuntime.iOS-14-3 | xargs xcrun simctl boot @@ -198,6 +207,9 @@ task: - flutter channel master - flutter upgrade - git fetch origin master + submodules_script: + - git submodule init + - git submodule update create_simulator_script: - xcrun simctl list - xcrun simctl create Flutter-iPhone com.apple.CoreSimulator.SimDeviceType.iPhone-X com.apple.CoreSimulator.SimRuntime.iOS-13-3 | xargs xcrun simctl boot @@ -227,6 +239,9 @@ task: - flutter channel master - flutter upgrade - git fetch origin master + submodules_script: + - git submodule init + - git submodule update matrix: - name: build_all_plugins_app script: From 6a279d96dac64de53b21994355cc3f27a44bc8e5 Mon Sep 17 00:00:00 2001 From: Emmanuel Garcia Date: Mon, 8 Feb 2021 14:09:12 -0800 Subject: [PATCH 3/4] Use http instead of ssh --- .gitmodules | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitmodules b/.gitmodules index 0930750294f6..d83ab14b23a0 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,3 @@ [submodule "script/plugin_tools"] path = script/plugin_tools - url = git@github.com:flutter/plugin_tools.git + url = https://github.com/flutter/plugin_tools.git From 5bb6ce7fc6ebdd1f2a033704f3a0013e27032bad Mon Sep 17 00:00:00 2001 From: Emmanuel Garcia Date: Mon, 8 Feb 2021 16:12:55 -0800 Subject: [PATCH 4/4] Clear .packages and pubspec.lock --- script/common.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/script/common.sh b/script/common.sh index 1287472c2611..4c8aff9822f6 100644 --- a/script/common.sh +++ b/script/common.sh @@ -48,6 +48,6 @@ function check_changed_packages() { # Runs the plugin tools from the plugin_tools git submodule. function plugin_tools() { - (pushd "$REPO_DIR/script/plugin_tools" && pub get && popd) >/dev/null + (pushd "$REPO_DIR/script/plugin_tools" && dart pub get && popd) >/dev/null dart run "$REPO_DIR/script/plugin_tools/lib/src/main.dart" "$@" }