Remove obsolete cmake version

Change-Id: I017d8aac8494ef817005cc7afe07237650c72c18
Bug: https://github.com/flutter/flutter/issues/122138
Reviewed-on: https://flutter-review.googlesource.com/c/recipes/+/40120
Commit-Queue: Keyong Han <keyonghan@google.com>
Reviewed-by: Ricardo Amador <ricardoamador@google.com>
diff --git a/recipe_modules/flutter_deps/api.py b/recipe_modules/flutter_deps/api.py
index 75d9541..14d0f2d 100644
--- a/recipe_modules/flutter_deps/api.py
+++ b/recipe_modules/flutter_deps/api.py
@@ -463,16 +463,8 @@
     """
     cmake_path = self.m.path['cache'].join('cmake')
     cmake = self.m.cipd.EnsureFile()
-    # Current infra/cmake is 4 years old, and causes failure when curling urls.
-    # We should point to the new 3pp version for all our targets.
-    #
-    # TODO(keyonghan): remove the if condition after validating all existing
-    # targets pass with the new 3pp package.
-    if version == 'version:3.16.1':
-      cmake.add_package('infra/cmake/${platform}', version)
-    else:
-      version = version or 'build_id:8787856497187628321'
-      cmake.add_package('infra/3pp/tools/cmake/${platform}', version)
+    version = version or 'build_id:8787856497187628321'
+    cmake.add_package('infra/3pp/tools/cmake/${platform}', version)
     with self.m.step.nest('Install cmake'):
       self.m.cipd.ensure(cmake_path, cmake)
     paths = env_prefixes.get('PATH', [])
diff --git a/recipe_modules/flutter_deps/examples/full.expected/basic.json b/recipe_modules/flutter_deps/examples/full.expected/basic.json
index 8c2ebb6..91ec7df 100644
--- a/recipe_modules/flutter_deps/examples/full.expected/basic.json
+++ b/recipe_modules/flutter_deps/examples/full.expected/basic.json
@@ -450,46 +450,13 @@
       "-root",
       "[CACHE]/cmake",
       "-ensure-file",
-      "infra/cmake/${platform} version:3.16.1",
-      "-max-threads",
-      "0",
-      "-json-output",
-      "/path/to/tmp/json"
-    ],
-    "name": "Install cmake.ensure_installed",
-    "~followup_annotations": [
-      "@@@STEP_NEST_LEVEL@1@@@",
-      "@@@STEP_LOG_LINE@json.output@{@@@",
-      "@@@STEP_LOG_LINE@json.output@  \"result\": {@@@",
-      "@@@STEP_LOG_LINE@json.output@    \"\": [@@@",
-      "@@@STEP_LOG_LINE@json.output@      {@@@",
-      "@@@STEP_LOG_LINE@json.output@        \"instance_id\": \"resolved-instance_id-of-version:3.16.1--\", @@@",
-      "@@@STEP_LOG_LINE@json.output@        \"package\": \"infra/cmake/resolved-platform\"@@@",
-      "@@@STEP_LOG_LINE@json.output@      }@@@",
-      "@@@STEP_LOG_LINE@json.output@    ]@@@",
-      "@@@STEP_LOG_LINE@json.output@  }@@@",
-      "@@@STEP_LOG_LINE@json.output@}@@@",
-      "@@@STEP_LOG_END@json.output@@@"
-    ]
-  },
-  {
-    "cmd": [],
-    "name": "Install cmake (2)"
-  },
-  {
-    "cmd": [
-      "cipd",
-      "ensure",
-      "-root",
-      "[CACHE]/cmake",
-      "-ensure-file",
       "infra/3pp/tools/cmake/${platform} build_id:8787856497187628321",
       "-max-threads",
       "0",
       "-json-output",
       "/path/to/tmp/json"
     ],
-    "name": "Install cmake (2).ensure_installed",
+    "name": "Install cmake.ensure_installed",
     "~followup_annotations": [
       "@@@STEP_NEST_LEVEL@1@@@",
       "@@@STEP_LOG_LINE@json.output@{@@@",
@@ -836,7 +803,6 @@
         "[CLEANUP]/go_path/bin",
         "[START_DIR]/firebase",
         "[CACHE]/cmake/bin",
-        "[CACHE]/cmake/bin",
         "[CLEANUP]/tmp_tmp_1",
         "[CACHE]/cosign/bin",
         "[CACHE]/ninja",
@@ -946,7 +912,6 @@
         "[CLEANUP]/go_path/bin",
         "[START_DIR]/firebase",
         "[CACHE]/cmake/bin",
-        "[CACHE]/cmake/bin",
         "[CLEANUP]/tmp_tmp_1",
         "[CACHE]/cosign/bin",
         "[CACHE]/ninja",
diff --git a/recipe_modules/flutter_deps/examples/full.expected/flutter_engine.json b/recipe_modules/flutter_deps/examples/full.expected/flutter_engine.json
index bdda86e..4cb7e5c 100644
--- a/recipe_modules/flutter_deps/examples/full.expected/flutter_engine.json
+++ b/recipe_modules/flutter_deps/examples/full.expected/flutter_engine.json
@@ -534,46 +534,13 @@
       "-root",
       "[CACHE]/cmake",
       "-ensure-file",
-      "infra/cmake/${platform} version:3.16.1",
-      "-max-threads",
-      "0",
-      "-json-output",
-      "/path/to/tmp/json"
-    ],
-    "name": "Install cmake.ensure_installed",
-    "~followup_annotations": [
-      "@@@STEP_NEST_LEVEL@1@@@",
-      "@@@STEP_LOG_LINE@json.output@{@@@",
-      "@@@STEP_LOG_LINE@json.output@  \"result\": {@@@",
-      "@@@STEP_LOG_LINE@json.output@    \"\": [@@@",
-      "@@@STEP_LOG_LINE@json.output@      {@@@",
-      "@@@STEP_LOG_LINE@json.output@        \"instance_id\": \"resolved-instance_id-of-version:3.16.1--\", @@@",
-      "@@@STEP_LOG_LINE@json.output@        \"package\": \"infra/cmake/resolved-platform\"@@@",
-      "@@@STEP_LOG_LINE@json.output@      }@@@",
-      "@@@STEP_LOG_LINE@json.output@    ]@@@",
-      "@@@STEP_LOG_LINE@json.output@  }@@@",
-      "@@@STEP_LOG_LINE@json.output@}@@@",
-      "@@@STEP_LOG_END@json.output@@@"
-    ]
-  },
-  {
-    "cmd": [],
-    "name": "Install cmake (2)"
-  },
-  {
-    "cmd": [
-      "cipd",
-      "ensure",
-      "-root",
-      "[CACHE]/cmake",
-      "-ensure-file",
       "infra/3pp/tools/cmake/${platform} build_id:8787856497187628321",
       "-max-threads",
       "0",
       "-json-output",
       "/path/to/tmp/json"
     ],
-    "name": "Install cmake (2).ensure_installed",
+    "name": "Install cmake.ensure_installed",
     "~followup_annotations": [
       "@@@STEP_NEST_LEVEL@1@@@",
       "@@@STEP_LOG_LINE@json.output@{@@@",
@@ -922,7 +889,6 @@
         "[CLEANUP]/go_path/bin",
         "[START_DIR]/firebase",
         "[CACHE]/cmake/bin",
-        "[CACHE]/cmake/bin",
         "[CLEANUP]/tmp_tmp_1",
         "[CACHE]/cosign/bin",
         "[CACHE]/ninja",
@@ -1034,7 +1000,6 @@
         "[CLEANUP]/go_path/bin",
         "[START_DIR]/firebase",
         "[CACHE]/cmake/bin",
-        "[CACHE]/cmake/bin",
         "[CLEANUP]/tmp_tmp_1",
         "[CACHE]/cosign/bin",
         "[CACHE]/ninja",
diff --git a/recipe_modules/flutter_deps/examples/full.expected/goldTryjob.json b/recipe_modules/flutter_deps/examples/full.expected/goldTryjob.json
index 8c2ebb6..91ec7df 100644
--- a/recipe_modules/flutter_deps/examples/full.expected/goldTryjob.json
+++ b/recipe_modules/flutter_deps/examples/full.expected/goldTryjob.json
@@ -450,46 +450,13 @@
       "-root",
       "[CACHE]/cmake",
       "-ensure-file",
-      "infra/cmake/${platform} version:3.16.1",
-      "-max-threads",
-      "0",
-      "-json-output",
-      "/path/to/tmp/json"
-    ],
-    "name": "Install cmake.ensure_installed",
-    "~followup_annotations": [
-      "@@@STEP_NEST_LEVEL@1@@@",
-      "@@@STEP_LOG_LINE@json.output@{@@@",
-      "@@@STEP_LOG_LINE@json.output@  \"result\": {@@@",
-      "@@@STEP_LOG_LINE@json.output@    \"\": [@@@",
-      "@@@STEP_LOG_LINE@json.output@      {@@@",
-      "@@@STEP_LOG_LINE@json.output@        \"instance_id\": \"resolved-instance_id-of-version:3.16.1--\", @@@",
-      "@@@STEP_LOG_LINE@json.output@        \"package\": \"infra/cmake/resolved-platform\"@@@",
-      "@@@STEP_LOG_LINE@json.output@      }@@@",
-      "@@@STEP_LOG_LINE@json.output@    ]@@@",
-      "@@@STEP_LOG_LINE@json.output@  }@@@",
-      "@@@STEP_LOG_LINE@json.output@}@@@",
-      "@@@STEP_LOG_END@json.output@@@"
-    ]
-  },
-  {
-    "cmd": [],
-    "name": "Install cmake (2)"
-  },
-  {
-    "cmd": [
-      "cipd",
-      "ensure",
-      "-root",
-      "[CACHE]/cmake",
-      "-ensure-file",
       "infra/3pp/tools/cmake/${platform} build_id:8787856497187628321",
       "-max-threads",
       "0",
       "-json-output",
       "/path/to/tmp/json"
     ],
-    "name": "Install cmake (2).ensure_installed",
+    "name": "Install cmake.ensure_installed",
     "~followup_annotations": [
       "@@@STEP_NEST_LEVEL@1@@@",
       "@@@STEP_LOG_LINE@json.output@{@@@",
@@ -836,7 +803,6 @@
         "[CLEANUP]/go_path/bin",
         "[START_DIR]/firebase",
         "[CACHE]/cmake/bin",
-        "[CACHE]/cmake/bin",
         "[CLEANUP]/tmp_tmp_1",
         "[CACHE]/cosign/bin",
         "[CACHE]/ninja",
@@ -946,7 +912,6 @@
         "[CLEANUP]/go_path/bin",
         "[START_DIR]/firebase",
         "[CACHE]/cmake/bin",
-        "[CACHE]/cmake/bin",
         "[CLEANUP]/tmp_tmp_1",
         "[CACHE]/cosign/bin",
         "[CACHE]/ninja",
diff --git a/recipe_modules/flutter_deps/examples/full.expected/linux.json b/recipe_modules/flutter_deps/examples/full.expected/linux.json
index 8c2ebb6..91ec7df 100644
--- a/recipe_modules/flutter_deps/examples/full.expected/linux.json
+++ b/recipe_modules/flutter_deps/examples/full.expected/linux.json
@@ -450,46 +450,13 @@
       "-root",
       "[CACHE]/cmake",
       "-ensure-file",
-      "infra/cmake/${platform} version:3.16.1",
-      "-max-threads",
-      "0",
-      "-json-output",
-      "/path/to/tmp/json"
-    ],
-    "name": "Install cmake.ensure_installed",
-    "~followup_annotations": [
-      "@@@STEP_NEST_LEVEL@1@@@",
-      "@@@STEP_LOG_LINE@json.output@{@@@",
-      "@@@STEP_LOG_LINE@json.output@  \"result\": {@@@",
-      "@@@STEP_LOG_LINE@json.output@    \"\": [@@@",
-      "@@@STEP_LOG_LINE@json.output@      {@@@",
-      "@@@STEP_LOG_LINE@json.output@        \"instance_id\": \"resolved-instance_id-of-version:3.16.1--\", @@@",
-      "@@@STEP_LOG_LINE@json.output@        \"package\": \"infra/cmake/resolved-platform\"@@@",
-      "@@@STEP_LOG_LINE@json.output@      }@@@",
-      "@@@STEP_LOG_LINE@json.output@    ]@@@",
-      "@@@STEP_LOG_LINE@json.output@  }@@@",
-      "@@@STEP_LOG_LINE@json.output@}@@@",
-      "@@@STEP_LOG_END@json.output@@@"
-    ]
-  },
-  {
-    "cmd": [],
-    "name": "Install cmake (2)"
-  },
-  {
-    "cmd": [
-      "cipd",
-      "ensure",
-      "-root",
-      "[CACHE]/cmake",
-      "-ensure-file",
       "infra/3pp/tools/cmake/${platform} build_id:8787856497187628321",
       "-max-threads",
       "0",
       "-json-output",
       "/path/to/tmp/json"
     ],
-    "name": "Install cmake (2).ensure_installed",
+    "name": "Install cmake.ensure_installed",
     "~followup_annotations": [
       "@@@STEP_NEST_LEVEL@1@@@",
       "@@@STEP_LOG_LINE@json.output@{@@@",
@@ -836,7 +803,6 @@
         "[CLEANUP]/go_path/bin",
         "[START_DIR]/firebase",
         "[CACHE]/cmake/bin",
-        "[CACHE]/cmake/bin",
         "[CLEANUP]/tmp_tmp_1",
         "[CACHE]/cosign/bin",
         "[CACHE]/ninja",
@@ -946,7 +912,6 @@
         "[CLEANUP]/go_path/bin",
         "[START_DIR]/firebase",
         "[CACHE]/cmake/bin",
-        "[CACHE]/cmake/bin",
         "[CLEANUP]/tmp_tmp_1",
         "[CACHE]/cosign/bin",
         "[CACHE]/ninja",
diff --git a/recipe_modules/flutter_deps/examples/full.expected/local_engine_cas.json b/recipe_modules/flutter_deps/examples/full.expected/local_engine_cas.json
index fcadb4e..1f31f8e 100644
--- a/recipe_modules/flutter_deps/examples/full.expected/local_engine_cas.json
+++ b/recipe_modules/flutter_deps/examples/full.expected/local_engine_cas.json
@@ -534,46 +534,13 @@
       "-root",
       "[CACHE]/cmake",
       "-ensure-file",
-      "infra/cmake/${platform} version:3.16.1",
-      "-max-threads",
-      "0",
-      "-json-output",
-      "/path/to/tmp/json"
-    ],
-    "name": "Install cmake.ensure_installed",
-    "~followup_annotations": [
-      "@@@STEP_NEST_LEVEL@1@@@",
-      "@@@STEP_LOG_LINE@json.output@{@@@",
-      "@@@STEP_LOG_LINE@json.output@  \"result\": {@@@",
-      "@@@STEP_LOG_LINE@json.output@    \"\": [@@@",
-      "@@@STEP_LOG_LINE@json.output@      {@@@",
-      "@@@STEP_LOG_LINE@json.output@        \"instance_id\": \"resolved-instance_id-of-version:3.16.1--\", @@@",
-      "@@@STEP_LOG_LINE@json.output@        \"package\": \"infra/cmake/resolved-platform\"@@@",
-      "@@@STEP_LOG_LINE@json.output@      }@@@",
-      "@@@STEP_LOG_LINE@json.output@    ]@@@",
-      "@@@STEP_LOG_LINE@json.output@  }@@@",
-      "@@@STEP_LOG_LINE@json.output@}@@@",
-      "@@@STEP_LOG_END@json.output@@@"
-    ]
-  },
-  {
-    "cmd": [],
-    "name": "Install cmake (2)"
-  },
-  {
-    "cmd": [
-      "cipd",
-      "ensure",
-      "-root",
-      "[CACHE]/cmake",
-      "-ensure-file",
       "infra/3pp/tools/cmake/${platform} build_id:8787856497187628321",
       "-max-threads",
       "0",
       "-json-output",
       "/path/to/tmp/json"
     ],
-    "name": "Install cmake (2).ensure_installed",
+    "name": "Install cmake.ensure_installed",
     "~followup_annotations": [
       "@@@STEP_NEST_LEVEL@1@@@",
       "@@@STEP_LOG_LINE@json.output@{@@@",
@@ -922,7 +889,6 @@
         "[CLEANUP]/go_path/bin",
         "[START_DIR]/firebase",
         "[CACHE]/cmake/bin",
-        "[CACHE]/cmake/bin",
         "[CLEANUP]/tmp_tmp_1",
         "[CACHE]/cosign/bin",
         "[CACHE]/ninja",
@@ -1034,7 +1000,6 @@
         "[CLEANUP]/go_path/bin",
         "[START_DIR]/firebase",
         "[CACHE]/cmake/bin",
-        "[CACHE]/cmake/bin",
         "[CLEANUP]/tmp_tmp_1",
         "[CACHE]/cosign/bin",
         "[CACHE]/ninja",
diff --git a/recipe_modules/flutter_deps/examples/full.expected/local_web_sdk_cas.json b/recipe_modules/flutter_deps/examples/full.expected/local_web_sdk_cas.json
index 87e5341..5437688 100644
--- a/recipe_modules/flutter_deps/examples/full.expected/local_web_sdk_cas.json
+++ b/recipe_modules/flutter_deps/examples/full.expected/local_web_sdk_cas.json
@@ -534,46 +534,13 @@
       "-root",
       "[CACHE]/cmake",
       "-ensure-file",
-      "infra/cmake/${platform} version:3.16.1",
-      "-max-threads",
-      "0",
-      "-json-output",
-      "/path/to/tmp/json"
-    ],
-    "name": "Install cmake.ensure_installed",
-    "~followup_annotations": [
-      "@@@STEP_NEST_LEVEL@1@@@",
-      "@@@STEP_LOG_LINE@json.output@{@@@",
-      "@@@STEP_LOG_LINE@json.output@  \"result\": {@@@",
-      "@@@STEP_LOG_LINE@json.output@    \"\": [@@@",
-      "@@@STEP_LOG_LINE@json.output@      {@@@",
-      "@@@STEP_LOG_LINE@json.output@        \"instance_id\": \"resolved-instance_id-of-version:3.16.1--\", @@@",
-      "@@@STEP_LOG_LINE@json.output@        \"package\": \"infra/cmake/resolved-platform\"@@@",
-      "@@@STEP_LOG_LINE@json.output@      }@@@",
-      "@@@STEP_LOG_LINE@json.output@    ]@@@",
-      "@@@STEP_LOG_LINE@json.output@  }@@@",
-      "@@@STEP_LOG_LINE@json.output@}@@@",
-      "@@@STEP_LOG_END@json.output@@@"
-    ]
-  },
-  {
-    "cmd": [],
-    "name": "Install cmake (2)"
-  },
-  {
-    "cmd": [
-      "cipd",
-      "ensure",
-      "-root",
-      "[CACHE]/cmake",
-      "-ensure-file",
       "infra/3pp/tools/cmake/${platform} build_id:8787856497187628321",
       "-max-threads",
       "0",
       "-json-output",
       "/path/to/tmp/json"
     ],
-    "name": "Install cmake (2).ensure_installed",
+    "name": "Install cmake.ensure_installed",
     "~followup_annotations": [
       "@@@STEP_NEST_LEVEL@1@@@",
       "@@@STEP_LOG_LINE@json.output@{@@@",
@@ -922,7 +889,6 @@
         "[CLEANUP]/go_path/bin",
         "[START_DIR]/firebase",
         "[CACHE]/cmake/bin",
-        "[CACHE]/cmake/bin",
         "[CLEANUP]/tmp_tmp_1",
         "[CACHE]/cosign/bin",
         "[CACHE]/ninja",
@@ -1034,7 +1000,6 @@
         "[CLEANUP]/go_path/bin",
         "[START_DIR]/firebase",
         "[CACHE]/cmake/bin",
-        "[CACHE]/cmake/bin",
         "[CLEANUP]/tmp_tmp_1",
         "[CACHE]/cosign/bin",
         "[CACHE]/ninja",
diff --git a/recipe_modules/flutter_deps/examples/full.expected/mac.json b/recipe_modules/flutter_deps/examples/full.expected/mac.json
index 6093de2..84ac477 100644
--- a/recipe_modules/flutter_deps/examples/full.expected/mac.json
+++ b/recipe_modules/flutter_deps/examples/full.expected/mac.json
@@ -512,46 +512,13 @@
       "-root",
       "[CACHE]/cmake",
       "-ensure-file",
-      "infra/cmake/${platform} version:3.16.1",
-      "-max-threads",
-      "0",
-      "-json-output",
-      "/path/to/tmp/json"
-    ],
-    "name": "Install cmake.ensure_installed",
-    "~followup_annotations": [
-      "@@@STEP_NEST_LEVEL@1@@@",
-      "@@@STEP_LOG_LINE@json.output@{@@@",
-      "@@@STEP_LOG_LINE@json.output@  \"result\": {@@@",
-      "@@@STEP_LOG_LINE@json.output@    \"\": [@@@",
-      "@@@STEP_LOG_LINE@json.output@      {@@@",
-      "@@@STEP_LOG_LINE@json.output@        \"instance_id\": \"resolved-instance_id-of-version:3.16.1--\", @@@",
-      "@@@STEP_LOG_LINE@json.output@        \"package\": \"infra/cmake/resolved-platform\"@@@",
-      "@@@STEP_LOG_LINE@json.output@      }@@@",
-      "@@@STEP_LOG_LINE@json.output@    ]@@@",
-      "@@@STEP_LOG_LINE@json.output@  }@@@",
-      "@@@STEP_LOG_LINE@json.output@}@@@",
-      "@@@STEP_LOG_END@json.output@@@"
-    ]
-  },
-  {
-    "cmd": [],
-    "name": "Install cmake (2)"
-  },
-  {
-    "cmd": [
-      "cipd",
-      "ensure",
-      "-root",
-      "[CACHE]/cmake",
-      "-ensure-file",
       "infra/3pp/tools/cmake/${platform} build_id:8787856497187628321",
       "-max-threads",
       "0",
       "-json-output",
       "/path/to/tmp/json"
     ],
-    "name": "Install cmake (2).ensure_installed",
+    "name": "Install cmake.ensure_installed",
     "~followup_annotations": [
       "@@@STEP_NEST_LEVEL@1@@@",
       "@@@STEP_LOG_LINE@json.output@{@@@",
@@ -853,7 +820,6 @@
         "[CACHE]/chrome/drivers",
         "[START_DIR]/firebase",
         "[CACHE]/cmake/bin",
-        "[CACHE]/cmake/bin",
         "[CLEANUP]/tmp_tmp_1",
         "[CACHE]/cosign/bin",
         "[CACHE]/ninja",
diff --git a/recipe_modules/flutter_deps/examples/full.expected/windows.json b/recipe_modules/flutter_deps/examples/full.expected/windows.json
index f63e2ed..a5d4c6e 100644
--- a/recipe_modules/flutter_deps/examples/full.expected/windows.json
+++ b/recipe_modules/flutter_deps/examples/full.expected/windows.json
@@ -450,46 +450,13 @@
       "-root",
       "[CACHE]\\cmake",
       "-ensure-file",
-      "infra/cmake/${platform} version:3.16.1",
-      "-max-threads",
-      "0",
-      "-json-output",
-      "/path/to/tmp/json"
-    ],
-    "name": "Install cmake.ensure_installed",
-    "~followup_annotations": [
-      "@@@STEP_NEST_LEVEL@1@@@",
-      "@@@STEP_LOG_LINE@json.output@{@@@",
-      "@@@STEP_LOG_LINE@json.output@  \"result\": {@@@",
-      "@@@STEP_LOG_LINE@json.output@    \"\": [@@@",
-      "@@@STEP_LOG_LINE@json.output@      {@@@",
-      "@@@STEP_LOG_LINE@json.output@        \"instance_id\": \"resolved-instance_id-of-version:3.16.1--\", @@@",
-      "@@@STEP_LOG_LINE@json.output@        \"package\": \"infra/cmake/resolved-platform\"@@@",
-      "@@@STEP_LOG_LINE@json.output@      }@@@",
-      "@@@STEP_LOG_LINE@json.output@    ]@@@",
-      "@@@STEP_LOG_LINE@json.output@  }@@@",
-      "@@@STEP_LOG_LINE@json.output@}@@@",
-      "@@@STEP_LOG_END@json.output@@@"
-    ]
-  },
-  {
-    "cmd": [],
-    "name": "Install cmake (2)"
-  },
-  {
-    "cmd": [
-      "cipd.bat",
-      "ensure",
-      "-root",
-      "[CACHE]\\cmake",
-      "-ensure-file",
       "infra/3pp/tools/cmake/${platform} build_id:8787856497187628321",
       "-max-threads",
       "0",
       "-json-output",
       "/path/to/tmp/json"
     ],
-    "name": "Install cmake (2).ensure_installed",
+    "name": "Install cmake.ensure_installed",
     "~followup_annotations": [
       "@@@STEP_NEST_LEVEL@1@@@",
       "@@@STEP_LOG_LINE@json.output@{@@@",
@@ -825,7 +792,6 @@
         "[CLEANUP]\\go_path\\bin",
         "[START_DIR]\\firebase",
         "[CACHE]\\cmake\\bin",
-        "[CACHE]\\cmake\\bin",
         "[CLEANUP]\\tmp_tmp_1",
         "[CACHE]\\cosign\\bin",
         "[CACHE]\\ninja",
@@ -902,7 +868,6 @@
         "[CLEANUP]\\go_path\\bin",
         "[START_DIR]\\firebase",
         "[CACHE]\\cmake\\bin",
-        "[CACHE]\\cmake\\bin",
         "[CLEANUP]\\tmp_tmp_1",
         "[CACHE]\\cosign\\bin",
         "[CACHE]\\ninja",
@@ -991,7 +956,6 @@
         "[CLEANUP]\\go_path\\bin",
         "[START_DIR]\\firebase",
         "[CACHE]\\cmake\\bin",
-        "[CACHE]\\cmake\\bin",
         "[CLEANUP]\\tmp_tmp_1",
         "[CACHE]\\cosign\\bin",
         "[CACHE]\\ninja",
diff --git a/recipe_modules/flutter_deps/examples/full.expected/with-arm64ruby.json b/recipe_modules/flutter_deps/examples/full.expected/with-arm64ruby.json
index acc3ceb..381fe1c 100644
--- a/recipe_modules/flutter_deps/examples/full.expected/with-arm64ruby.json
+++ b/recipe_modules/flutter_deps/examples/full.expected/with-arm64ruby.json
@@ -450,46 +450,13 @@
       "-root",
       "[CACHE]/cmake",
       "-ensure-file",
-      "infra/cmake/${platform} version:3.16.1",
-      "-max-threads",
-      "0",
-      "-json-output",
-      "/path/to/tmp/json"
-    ],
-    "name": "Install cmake.ensure_installed",
-    "~followup_annotations": [
-      "@@@STEP_NEST_LEVEL@1@@@",
-      "@@@STEP_LOG_LINE@json.output@{@@@",
-      "@@@STEP_LOG_LINE@json.output@  \"result\": {@@@",
-      "@@@STEP_LOG_LINE@json.output@    \"\": [@@@",
-      "@@@STEP_LOG_LINE@json.output@      {@@@",
-      "@@@STEP_LOG_LINE@json.output@        \"instance_id\": \"resolved-instance_id-of-version:3.16.1--\", @@@",
-      "@@@STEP_LOG_LINE@json.output@        \"package\": \"infra/cmake/resolved-platform\"@@@",
-      "@@@STEP_LOG_LINE@json.output@      }@@@",
-      "@@@STEP_LOG_LINE@json.output@    ]@@@",
-      "@@@STEP_LOG_LINE@json.output@  }@@@",
-      "@@@STEP_LOG_LINE@json.output@}@@@",
-      "@@@STEP_LOG_END@json.output@@@"
-    ]
-  },
-  {
-    "cmd": [],
-    "name": "Install cmake (2)"
-  },
-  {
-    "cmd": [
-      "cipd",
-      "ensure",
-      "-root",
-      "[CACHE]/cmake",
-      "-ensure-file",
       "infra/3pp/tools/cmake/${platform} build_id:8787856497187628321",
       "-max-threads",
       "0",
       "-json-output",
       "/path/to/tmp/json"
     ],
-    "name": "Install cmake (2).ensure_installed",
+    "name": "Install cmake.ensure_installed",
     "~followup_annotations": [
       "@@@STEP_NEST_LEVEL@1@@@",
       "@@@STEP_LOG_LINE@json.output@{@@@",
@@ -836,7 +803,6 @@
         "[CLEANUP]/go_path/bin",
         "[START_DIR]/firebase",
         "[CACHE]/cmake/bin",
-        "[CACHE]/cmake/bin",
         "[CLEANUP]/tmp_tmp_1",
         "[CACHE]/cosign/bin",
         "[CACHE]/ninja",
@@ -946,7 +912,6 @@
         "[CLEANUP]/go_path/bin",
         "[START_DIR]/firebase",
         "[CACHE]/cmake/bin",
-        "[CACHE]/cmake/bin",
         "[CLEANUP]/tmp_tmp_1",
         "[CACHE]/cosign/bin",
         "[CACHE]/ninja",
diff --git a/recipe_modules/flutter_deps/examples/full.expected/with-gems.json b/recipe_modules/flutter_deps/examples/full.expected/with-gems.json
index ee3e35f..29d1f3a 100644
--- a/recipe_modules/flutter_deps/examples/full.expected/with-gems.json
+++ b/recipe_modules/flutter_deps/examples/full.expected/with-gems.json
@@ -450,46 +450,13 @@
       "-root",
       "[CACHE]/cmake",
       "-ensure-file",
-      "infra/cmake/${platform} version:3.16.1",
-      "-max-threads",
-      "0",
-      "-json-output",
-      "/path/to/tmp/json"
-    ],
-    "name": "Install cmake.ensure_installed",
-    "~followup_annotations": [
-      "@@@STEP_NEST_LEVEL@1@@@",
-      "@@@STEP_LOG_LINE@json.output@{@@@",
-      "@@@STEP_LOG_LINE@json.output@  \"result\": {@@@",
-      "@@@STEP_LOG_LINE@json.output@    \"\": [@@@",
-      "@@@STEP_LOG_LINE@json.output@      {@@@",
-      "@@@STEP_LOG_LINE@json.output@        \"instance_id\": \"resolved-instance_id-of-version:3.16.1--\", @@@",
-      "@@@STEP_LOG_LINE@json.output@        \"package\": \"infra/cmake/resolved-platform\"@@@",
-      "@@@STEP_LOG_LINE@json.output@      }@@@",
-      "@@@STEP_LOG_LINE@json.output@    ]@@@",
-      "@@@STEP_LOG_LINE@json.output@  }@@@",
-      "@@@STEP_LOG_LINE@json.output@}@@@",
-      "@@@STEP_LOG_END@json.output@@@"
-    ]
-  },
-  {
-    "cmd": [],
-    "name": "Install cmake (2)"
-  },
-  {
-    "cmd": [
-      "cipd",
-      "ensure",
-      "-root",
-      "[CACHE]/cmake",
-      "-ensure-file",
       "infra/3pp/tools/cmake/${platform} build_id:8787856497187628321",
       "-max-threads",
       "0",
       "-json-output",
       "/path/to/tmp/json"
     ],
-    "name": "Install cmake (2).ensure_installed",
+    "name": "Install cmake.ensure_installed",
     "~followup_annotations": [
       "@@@STEP_NEST_LEVEL@1@@@",
       "@@@STEP_LOG_LINE@json.output@{@@@",
@@ -836,7 +803,6 @@
         "[CLEANUP]/go_path/bin",
         "[START_DIR]/firebase",
         "[CACHE]/cmake/bin",
-        "[CACHE]/cmake/bin",
         "[CLEANUP]/tmp_tmp_1",
         "[CACHE]/cosign/bin",
         "[CACHE]/ninja",
@@ -946,7 +912,6 @@
         "[CLEANUP]/go_path/bin",
         "[START_DIR]/firebase",
         "[CACHE]/cmake/bin",
-        "[CACHE]/cmake/bin",
         "[CLEANUP]/tmp_tmp_1",
         "[CACHE]/cosign/bin",
         "[CACHE]/ninja",
diff --git a/recipe_modules/flutter_deps/examples/full.py b/recipe_modules/flutter_deps/examples/full.py
index 462fabc..3449b36 100644
--- a/recipe_modules/flutter_deps/examples/full.py
+++ b/recipe_modules/flutter_deps/examples/full.py
@@ -56,7 +56,6 @@
   api.flutter_deps.gradle_cache(env, env_prefixes, '')
   api.flutter_deps.flutter_engine(env, env_prefixes)
   api.flutter_deps.firebase(env, env_prefixes)
-  api.flutter_deps.cmake(env, env_prefixes, version='version:3.16.1')
   api.flutter_deps.cmake(env, env_prefixes, version='build_id:8787856497187628321')
   api.flutter_deps.codesign(env, env_prefixes, 'latest')
   api.flutter_deps.cosign(env, env_prefixes)