Fix sharding and shard count on apk tests (#2936)

* Use shard variables correctly in incremental_build.sh
* Add more shards for the apk tasks.
diff --git a/.cirrus.yml b/.cirrus.yml
index d27ce68..915f9f8 100644
--- a/.cirrus.yml
+++ b/.cirrus.yml
@@ -63,8 +63,10 @@
     - name: build-apks+java-test+firebase-test-lab
       env:
         matrix:
-          PLUGIN_SHARDING: "--shardIndex 0 --shardCount 2"
-          PLUGIN_SHARDING: "--shardIndex 1 --shardCount 2"
+          PLUGIN_SHARDING: "--shardIndex 0 --shardCount 4"
+          PLUGIN_SHARDING: "--shardIndex 1 --shardCount 4"
+          PLUGIN_SHARDING: "--shardIndex 2 --shardCount 4"
+          PLUGIN_SHARDING: "--shardIndex 3 --shardCount 4"
         matrix:
           CHANNEL: "master"
           CHANNEL: "stable"
diff --git a/script/incremental_build.sh b/script/incremental_build.sh
index 3b0b97f..ba8bf93 100755
--- a/script/incremental_build.sh
+++ b/script/incremental_build.sh
@@ -29,9 +29,14 @@
 fi
 
 BRANCH_NAME="${BRANCH_NAME:-"$(git rev-parse --abbrev-ref HEAD)"}"
+
+# This has to be turned into a list and then split out to the command line,
+# otherwise it gets treated as a single argument.
+PLUGIN_SHARDING=($PLUGIN_SHARDING)
+
 if [[ "${BRANCH_NAME}" == "master" ]]; then
   echo "Running for all packages"
-  (cd "$REPO_DIR" && pub global run flutter_plugin_tools "${ACTIONS[@]}" $PLUGIN_SHARDING)
+  (cd "$REPO_DIR" && pub global run flutter_plugin_tools "${ACTIONS[@]}" ${PLUGIN_SHARDING[@]})
 else
   # Sets CHANGED_PACKAGES
   check_changed_packages
@@ -39,10 +44,10 @@
   if [[ "$CHANGED_PACKAGES" == "" ]]; then
     echo "No changes detected in packages."
     echo "Running for all packages"
-    (cd "$REPO_DIR" && pub global run flutter_plugin_tools "${ACTIONS[@]}" $PLUGIN_SHARDING)
+    (cd "$REPO_DIR" && pub global run flutter_plugin_tools "${ACTIONS[@]}" ${PLUGIN_SHARDING[@]})
   else
     echo running "${ACTIONS[@]}"
-    (cd "$REPO_DIR" && pub global run flutter_plugin_tools "${ACTIONS[@]}" --plugins="$CHANGED_PACKAGES" $PLUGIN_SHARDING)
+    (cd "$REPO_DIR" && pub global run flutter_plugin_tools "${ACTIONS[@]}" --plugins="$CHANGED_PACKAGES" ${PLUGIN_SHARDING[@]})
     echo "Running version check for changed packages"
     (cd "$REPO_DIR" && pub global run flutter_plugin_tools version-check --base_sha="$(get_branch_base_sha)")
   fi