| # This script builds the app in flutter/plugins/example/all_plugins to make |
| # sure all first party plugins can be compiled together. |
| # So that users can run this script from anywhere and it will work as expected. |
| readonly SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" > /dev/null && pwd)" |
| readonly REPO_DIR="$(dirname "$SCRIPT_DIR")" |
| source "$SCRIPT_DIR/common.sh" |
| check_changed_packages > /dev/null |
| (cd "$REPO_DIR" && pub global run flutter_plugin_tools all-plugins-app --exclude instrumentation_adapter,url_launcher_platform_interface) |
| for version in "debug" "release"; do |
| (cd $REPO_DIR/all_plugins && flutter build $@ --$version) |
| echo "Successfully built $version all_plugins app." |
| echo "All first party plugins compile together." |
| error "Failed to build $version all_plugins app." |
| if [[ "${#CHANGED_PACKAGE_LIST[@]}" == 0 ]]; then |
| error "There was a failure to compile all first party plugins together, but there were no changes detected in packages." |
| error "Changes to the following packages may prevent all first party plugins from compiling together:" |
| for package in "${CHANGED_PACKAGE_LIST[@]}"; do |
| failures=$(($failures + 1)) |
| rm -rf $REPO_DIR/all_plugins/ |