Remove podspec lint bash script, use flutter_plugin_tools (#2346)
diff --git a/.cirrus.yml b/.cirrus.yml
index 753bc90..b2b3ca3 100644
--- a/.cirrus.yml
+++ b/.cirrus.yml
@@ -123,7 +123,16 @@
- flutter channel $CHANNEL
- ./script/build_all_plugins_app.sh ios --no-codesign
- name: lint_darwin_plugins
- script: ./script/lint_darwin_plugins.sh
+ env:
+ matrix:
+ PLUGIN_SHARDING: "--shardIndex 0 --shardCount 2"
+ PLUGIN_SHARDING: "--shardIndex 1 --shardCount 2"
+ script:
+ # TODO(jmagman): Lint macOS podspecs but skip any that fail library validation.
+ - find . -name "*.podspec" | xargs grep -l "osx" | xargs rm
+ # Skip the dummy podspecs used to placate the tool.
+ - find . -name "*_web*.podspec" -o -name "*_mac*.podspec" | xargs rm
+ - ./script/incremental_build.sh podspecs --no-analyze camera --skip google_sign_in --skip webview_flutter
- name: build-ipas+drive-examples
env:
PATH: $PATH:/usr/local/bin
@@ -162,8 +171,6 @@
script:
- flutter channel master
- ./script/build_all_plugins_app.sh macos
- - name: lint_darwin_plugins
- script: ./script/lint_darwin_plugins.sh
- name: build-apps+drive-examples
env:
PATH: $PATH:/usr/local/bin
diff --git a/script/lint_darwin_plugins.sh b/script/lint_darwin_plugins.sh
deleted file mode 100755
index 7e74970..0000000
--- a/script/lint_darwin_plugins.sh
+++ /dev/null
@@ -1,88 +0,0 @@
-#!/bin/bash
-
-# This script lints and tests iOS and macOS platform code.
-
-# 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"
-
-function lint_package() {
- local package_name="$1"
- local package_dir="${REPO_DIR}/packages/$package_name/"
- local failure_count=0
-
- # These podspecs are temporary multi-platform adoption dummy files.
- local skipped_podspecs=(
- "url_launcher_web.podspec"
- "google_sign_in_web.podspec"
- )
-
- # TODO: These packages have analyzer warnings. Remove plugins from this list as issues are fixed.
- local skip_analysis_packages=(
- "camera.podspec" # https://github.com/flutter/flutter/issues/42673
- )
- find "${package_dir}" -type f -name "*\.podspec" | while read podspec; do
- local podspecBasename=$(basename "${podspec}")
- if [[ "${skipped_podspecs[*]}" =~ "${podspecBasename}" ]]; then
- continue
- fi
-
- # TODO: Remove --allow-warnings flag https://github.com/flutter/flutter/issues/41444
- local lint_args=(
- lib
- lint
- "${podspec}"
- --allow-warnings
- --fail-fast
- --silent
- )
- if [[ ! "${skip_analysis_packages[*]}" =~ "${podspecBasename}" ]]; then
- lint_args+=(--analyze)
- echo "Linting and analyzing ${podspecBasename}"
- else
- echo "Linting ${podspecBasename}"
- fi
-
- # Build as frameworks.
- # This will also run any tests set up as a test_spec. See https://blog.cocoapods.org/CocoaPods-1.3.0.
- pod "${lint_args[@]}"
- if [[ "$?" -ne 0 ]]; then
- error "Package ${package_name} has framework issues. Run \"pod lib lint ${podspec} --analyze\" to inspect."
- failure_count+=1
- fi
-
- # Build as libraries.
- lint_args+=(--use-libraries)
- pod "${lint_args[@]}"
- if [[ "$?" -ne 0 ]]; then
- error "Package ${package_name} has library issues. Run \"pod lib lint ${podspec} --use-libraries --analyze\" to inspect."
- failure_count+=1
- fi
- done
-
- return "${failure_count}"
-}
-
-function lint_packages() {
- if [[ ! "$(which pod)" ]]; then
- echo "pod not installed. Skipping."
- return
- fi
-
- local failure_count=0
- for package_name in "$@"; do
- lint_package "${package_name}"
- failure_count+="$?"
- done
-
- return "${failure_count}"
-}
-
-# Sets CHANGED_PACKAGE_LIST
-check_changed_packages
-
-if [[ "${#CHANGED_PACKAGE_LIST[@]}" != 0 ]]; then
- lint_packages "${CHANGED_PACKAGE_LIST[@]}"
-fi