Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.

Add plugin tools as a git submodule and depend on it directly #3527

Merged
merged 4 commits into from
Feb 9, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions .cirrus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand Down
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "script/plugin_tools"]
path = script/plugin_tools
url = https://github.com/flutter/plugin_tools.git
3 changes: 1 addition & 2 deletions script/check_publish.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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."
Expand Down
16 changes: 3 additions & 13 deletions script/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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" && dart pub get && popd) >/dev/null
dart run "$REPO_DIR/script/plugin_tools/lib/src/main.dart" "$@"
}
1 change: 1 addition & 0 deletions script/plugin_tools
Submodule plugin_tools added at 432c56