Remove autoninja.

Removes autoninja support from the build API.

Change-Id: Iaab434ef8bca3c7594bc153b138ee340e1cd7d08
Reviewed-on: https://flutter-review.googlesource.com/c/recipes/+/37060
Commit-Queue: Godofredo Contreras <godofredoc@google.com>
Reviewed-by: Junji Watanabe <jwata@google.com>
diff --git a/recipe_modules/build_util/api.py b/recipe_modules/build_util/api.py
index 589ee05..621fa2e 100644
--- a/recipe_modules/build_util/api.py
+++ b/recipe_modules/build_util/api.py
@@ -84,20 +84,8 @@
       checkout_path(Path): A path object with the checkout location.
       targets(list): A list of string with the ninja targets to build.
     """
+    ninja_path = checkout_path.join('flutter', 'third_party', 'ninja', 'ninja')
     if not self.m.properties.get('no_goma', False):
-      self._build_goma(config, checkout_path, targets, self.m.depot_tools.ninja_path)
+      self._build_goma(config, checkout_path, targets, ninja_path)
     else:
-      self._build_no_goma(config, checkout_path, targets, self.m.depot_tools.ninja_path)
-
-  def build_autoninja(self, config, checkout_path, targets):
-    """Builds using autoninja.
-
-    Args:
-      config(str): A string with the configuration to build.
-      checkout_path(Path): A path object with the checkout location.
-      targets(list): A list of string with the ninja targets to build.
-    """
-    if not self.m.properties.get('no_goma', False):
-      self._build_goma(config, checkout_path, targets, self.m.depot_tools.autoninja_path)
-    else:
-      self._build_no_goma(config, checkout_path, targets, self.m.depot_tools.autoninja_path)
+      self._build_no_goma(config, checkout_path, targets, ninja_path)
diff --git a/recipe_modules/build_util/examples/full.expected/goma.json b/recipe_modules/build_util/examples/full.expected/goma.json
index 5f1d283..5747720 100644
--- a/recipe_modules/build_util/examples/full.expected/goma.json
+++ b/recipe_modules/build_util/examples/full.expected/goma.json
@@ -236,7 +236,7 @@
   },
   {
     "cmd": [
-      "RECIPE_REPO[depot_tools]/ninja",
+      "[START_DIR]/flutter/third_party/ninja/ninja",
       "-j",
       "100",
       "-C",
@@ -393,193 +393,6 @@
     ]
   },
   {
-    "cmd": [],
-    "name": "setup goma (2)"
-  },
-  {
-    "cmd": [
-      "[START_DIR]/cipd_tool/path/to/cpython3/version%3Apinned-version/bin/python3",
-      "[CACHE]/goma/client/goma_ctl.py",
-      "restart"
-    ],
-    "env": {
-      "GLOG_log_dir": "[CLEANUP]",
-      "GOMA_CACHE_DIR": "[CACHE]/goma",
-      "GOMA_DEPS_CACHE_FILE": "goma_deps_cache",
-      "GOMA_DIR": "[CACHE]/goma/client",
-      "GOMA_DUMP_STATS_FILE": "[CACHE]/goma/client/goma_stats.json",
-      "GOMA_LOCAL_OUTPUT_CACHE_DIR": "[CACHE]/goma/localoutputcache",
-      "GOMA_MAX_SUM_OUTPUT_SIZE_IN_MB": "256",
-      "GOMA_SERVER_HOST": "rbe-prod1.endpoints.fuchsia-infra-goma-prod.cloud.goog",
-      "GOMA_STORE_LOCAL_RUN_OUTPUT": "True",
-      "GOMA_TMP_DIR": "[CLEANUP]/goma",
-      "GOMA_USE_LOCAL": "False"
-    },
-    "infra_step": true,
-    "name": "setup goma (2).start goma",
-    "~followup_annotations": [
-      "@@@STEP_NEST_LEVEL@1@@@"
-    ]
-  },
-  {
-    "cmd": [
-      "RECIPE_REPO[depot_tools]/autoninja",
-      "-j",
-      "100",
-      "-C",
-      "[START_DIR]/out/release",
-      "mytarget"
-    ],
-    "env": {
-      "GOMA_DIR": "[CACHE]/goma/client",
-      "GOMA_TMP_DIR": "[CLEANUP]/goma",
-      "GOMA_USE_LOCAL": "False"
-    },
-    "env_suffixes": {
-      "DEPOT_TOOLS_UPDATE": [
-        "0"
-      ],
-      "PATH": [
-        "RECIPE_REPO[depot_tools]"
-      ]
-    },
-    "name": "build release mytarget (2)"
-  },
-  {
-    "cmd": [],
-    "name": "teardown goma (2)"
-  },
-  {
-    "cmd": [
-      "[START_DIR]/cipd_tool/path/to/cpython3/version%3Apinned-version/bin/python3",
-      "[CACHE]/goma/client/goma_ctl.py",
-      "jsonstatus",
-      "[CACHE]/goma/client/jsonstatus"
-    ],
-    "env": {
-      "GLOG_log_dir": "[CLEANUP]",
-      "GOMA_CACHE_DIR": "[CACHE]/goma",
-      "GOMA_DEPS_CACHE_FILE": "goma_deps_cache",
-      "GOMA_DIR": "[CACHE]/goma/client",
-      "GOMA_DUMP_STATS_FILE": "[CACHE]/goma/client/goma_stats.json",
-      "GOMA_LOCAL_OUTPUT_CACHE_DIR": "[CACHE]/goma/localoutputcache",
-      "GOMA_MAX_SUM_OUTPUT_SIZE_IN_MB": "256",
-      "GOMA_SERVER_HOST": "rbe-prod1.endpoints.fuchsia-infra-goma-prod.cloud.goog",
-      "GOMA_STORE_LOCAL_RUN_OUTPUT": "True",
-      "GOMA_TMP_DIR": "[CLEANUP]/goma",
-      "GOMA_USE_LOCAL": "False"
-    },
-    "name": "teardown goma (2).goma jsonstatus",
-    "~followup_annotations": [
-      "@@@STEP_NEST_LEVEL@1@@@",
-      "@@@STEP_LOG_LINE@json.output@{@@@",
-      "@@@STEP_LOG_LINE@json.output@  \"notice\": [@@@",
-      "@@@STEP_LOG_LINE@json.output@    {@@@",
-      "@@@STEP_LOG_LINE@json.output@      \"infra_status\": {@@@",
-      "@@@STEP_LOG_LINE@json.output@        \"num_user_error\": 0, @@@",
-      "@@@STEP_LOG_LINE@json.output@        \"ping_status_code\": 200@@@",
-      "@@@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": [
-      "[START_DIR]/cipd_tool/path/to/cpython3/version%3Apinned-version/bin/python3",
-      "[CACHE]/goma/client/goma_ctl.py",
-      "stat"
-    ],
-    "env": {
-      "GLOG_log_dir": "[CLEANUP]",
-      "GOMA_CACHE_DIR": "[CACHE]/goma",
-      "GOMA_DEPS_CACHE_FILE": "goma_deps_cache",
-      "GOMA_DIR": "[CACHE]/goma/client",
-      "GOMA_DUMP_STATS_FILE": "[CACHE]/goma/client/goma_stats.json",
-      "GOMA_LOCAL_OUTPUT_CACHE_DIR": "[CACHE]/goma/localoutputcache",
-      "GOMA_MAX_SUM_OUTPUT_SIZE_IN_MB": "256",
-      "GOMA_SERVER_HOST": "rbe-prod1.endpoints.fuchsia-infra-goma-prod.cloud.goog",
-      "GOMA_STORE_LOCAL_RUN_OUTPUT": "True",
-      "GOMA_TMP_DIR": "[CLEANUP]/goma",
-      "GOMA_USE_LOCAL": "False"
-    },
-    "name": "teardown goma (2).goma stats",
-    "~followup_annotations": [
-      "@@@STEP_NEST_LEVEL@1@@@"
-    ]
-  },
-  {
-    "cmd": [
-      "[START_DIR]/cipd_tool/path/to/cpython3/version%3Apinned-version/bin/python3",
-      "[CACHE]/goma/client/goma_ctl.py",
-      "stop"
-    ],
-    "env": {
-      "GLOG_log_dir": "[CLEANUP]",
-      "GOMA_CACHE_DIR": "[CACHE]/goma",
-      "GOMA_DEPS_CACHE_FILE": "goma_deps_cache",
-      "GOMA_DIR": "[CACHE]/goma/client",
-      "GOMA_DUMP_STATS_FILE": "[CACHE]/goma/client/goma_stats.json",
-      "GOMA_LOCAL_OUTPUT_CACHE_DIR": "[CACHE]/goma/localoutputcache",
-      "GOMA_MAX_SUM_OUTPUT_SIZE_IN_MB": "256",
-      "GOMA_SERVER_HOST": "rbe-prod1.endpoints.fuchsia-infra-goma-prod.cloud.goog",
-      "GOMA_STORE_LOCAL_RUN_OUTPUT": "True",
-      "GOMA_TMP_DIR": "[CLEANUP]/goma",
-      "GOMA_USE_LOCAL": "False"
-    },
-    "name": "teardown goma (2).stop goma",
-    "~followup_annotations": [
-      "@@@STEP_NEST_LEVEL@1@@@"
-    ]
-  },
-  {
-    "cmd": [
-      "vpython3",
-      "-u",
-      "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
-      "--json-output",
-      "/path/to/tmp/json",
-      "copy",
-      "[CLEANUP]/compiler_proxy.WARNING",
-      "/path/to/tmp/"
-    ],
-    "env": {
-      "GOMA_DIR": "[CACHE]/goma/client",
-      "GOMA_TMP_DIR": "[CLEANUP]/goma",
-      "GOMA_USE_LOCAL": "False"
-    },
-    "infra_step": true,
-    "name": "teardown goma (2).read goma_client warning log",
-    "~followup_annotations": [
-      "@@@STEP_NEST_LEVEL@1@@@",
-      "@@@STEP_LOG_LINE@compiler_proxy.WARNING@test log@@@",
-      "@@@STEP_LOG_END@compiler_proxy.WARNING@@@"
-    ]
-  },
-  {
-    "cmd": [
-      "vpython3",
-      "-u",
-      "RECIPE_MODULE[recipe_engine::file]/resources/fileutil.py",
-      "--json-output",
-      "/path/to/tmp/json",
-      "copy",
-      "[CACHE]/goma/client/goma_stats.json",
-      "/path/to/tmp/"
-    ],
-    "env": {
-      "GOMA_DIR": "[CACHE]/goma/client",
-      "GOMA_TMP_DIR": "[CLEANUP]/goma",
-      "GOMA_USE_LOCAL": "False"
-    },
-    "infra_step": true,
-    "name": "teardown goma (2).read goma_stats.json",
-    "~followup_annotations": [
-      "@@@STEP_NEST_LEVEL@1@@@"
-    ]
-  },
-  {
     "name": "$result"
   }
 ]
\ No newline at end of file
diff --git a/recipe_modules/build_util/examples/full.expected/no_goma.json b/recipe_modules/build_util/examples/full.expected/no_goma.json
index b7efb10..60ff356 100644
--- a/recipe_modules/build_util/examples/full.expected/no_goma.json
+++ b/recipe_modules/build_util/examples/full.expected/no_goma.json
@@ -46,7 +46,7 @@
   },
   {
     "cmd": [
-      "RECIPE_REPO[depot_tools]/ninja",
+      "[START_DIR]/flutter/third_party/ninja/ninja",
       "-C",
       "[START_DIR]/out/release",
       "mytarget"
@@ -65,26 +65,6 @@
     "name": "build release mytarget"
   },
   {
-    "cmd": [
-      "RECIPE_REPO[depot_tools]/autoninja",
-      "-C",
-      "[START_DIR]/out/release",
-      "mytarget"
-    ],
-    "env": {
-      "GOMA_DIR": "[CACHE]/goma/client"
-    },
-    "env_suffixes": {
-      "DEPOT_TOOLS_UPDATE": [
-        "0"
-      ],
-      "PATH": [
-        "RECIPE_REPO[depot_tools]"
-      ]
-    },
-    "name": "build release mytarget (2)"
-  },
-  {
     "name": "$result"
   }
 ]
\ No newline at end of file
diff --git a/recipe_modules/build_util/examples/full.py b/recipe_modules/build_util/examples/full.py
index 639fd1b..1aaf116 100644
--- a/recipe_modules/build_util/examples/full.py
+++ b/recipe_modules/build_util/examples/full.py
@@ -21,7 +21,6 @@
   with api.context(env=env, env_prefixes=env_prefixes):
     api.build_util.run_gn([], checkout)
     api.build_util.build('release', checkout, ['mytarget'])
-    api.build_util.build_autoninja('release', checkout, ['mytarget'])
 
 
 def GenTests(api):
diff --git a/recipes/engine/engine_lint.expected/linux android all.json b/recipes/engine/engine_lint.expected/linux android all.json
index 71b88c0..11ac78b 100644
--- a/recipes/engine/engine_lint.expected/linux android all.json
+++ b/recipes/engine/engine_lint.expected/linux android all.json
@@ -786,7 +786,7 @@
   },
   {
     "cmd": [
-      "RECIPE_REPO[depot_tools]/ninja",
+      "[CACHE]/builder/src/flutter/third_party/ninja/ninja",
       "-j",
       "1024",
       "-C",
@@ -1465,7 +1465,7 @@
   },
   {
     "cmd": [
-      "RECIPE_REPO[depot_tools]/ninja",
+      "[CACHE]/builder/src/flutter/third_party/ninja/ninja",
       "-j",
       "1024",
       "-C",
diff --git a/recipes/engine/engine_lint.expected/linux android branch.json b/recipes/engine/engine_lint.expected/linux android branch.json
index 71b88c0..11ac78b 100644
--- a/recipes/engine/engine_lint.expected/linux android branch.json
+++ b/recipes/engine/engine_lint.expected/linux android branch.json
@@ -786,7 +786,7 @@
   },
   {
     "cmd": [
-      "RECIPE_REPO[depot_tools]/ninja",
+      "[CACHE]/builder/src/flutter/third_party/ninja/ninja",
       "-j",
       "1024",
       "-C",
@@ -1465,7 +1465,7 @@
   },
   {
     "cmd": [
-      "RECIPE_REPO[depot_tools]/ninja",
+      "[CACHE]/builder/src/flutter/third_party/ninja/ninja",
       "-j",
       "1024",
       "-C",
diff --git a/recipes/engine/engine_lint.expected/linux android head.json b/recipes/engine/engine_lint.expected/linux android head.json
index d91d68e..9ea2518 100644
--- a/recipes/engine/engine_lint.expected/linux android head.json
+++ b/recipes/engine/engine_lint.expected/linux android head.json
@@ -786,7 +786,7 @@
   },
   {
     "cmd": [
-      "RECIPE_REPO[depot_tools]/ninja",
+      "[CACHE]/builder/src/flutter/third_party/ninja/ninja",
       "-j",
       "1024",
       "-C",
@@ -1466,7 +1466,7 @@
   },
   {
     "cmd": [
-      "RECIPE_REPO[depot_tools]/ninja",
+      "[CACHE]/builder/src/flutter/third_party/ninja/ninja",
       "-j",
       "1024",
       "-C",
diff --git a/recipes/engine/engine_lint.expected/linux host all.json b/recipes/engine/engine_lint.expected/linux host all.json
index 71b88c0..11ac78b 100644
--- a/recipes/engine/engine_lint.expected/linux host all.json
+++ b/recipes/engine/engine_lint.expected/linux host all.json
@@ -786,7 +786,7 @@
   },
   {
     "cmd": [
-      "RECIPE_REPO[depot_tools]/ninja",
+      "[CACHE]/builder/src/flutter/third_party/ninja/ninja",
       "-j",
       "1024",
       "-C",
@@ -1465,7 +1465,7 @@
   },
   {
     "cmd": [
-      "RECIPE_REPO[depot_tools]/ninja",
+      "[CACHE]/builder/src/flutter/third_party/ninja/ninja",
       "-j",
       "1024",
       "-C",
diff --git a/recipes/engine/engine_lint.expected/linux host branch.json b/recipes/engine/engine_lint.expected/linux host branch.json
index 71b88c0..11ac78b 100644
--- a/recipes/engine/engine_lint.expected/linux host branch.json
+++ b/recipes/engine/engine_lint.expected/linux host branch.json
@@ -786,7 +786,7 @@
   },
   {
     "cmd": [
-      "RECIPE_REPO[depot_tools]/ninja",
+      "[CACHE]/builder/src/flutter/third_party/ninja/ninja",
       "-j",
       "1024",
       "-C",
@@ -1465,7 +1465,7 @@
   },
   {
     "cmd": [
-      "RECIPE_REPO[depot_tools]/ninja",
+      "[CACHE]/builder/src/flutter/third_party/ninja/ninja",
       "-j",
       "1024",
       "-C",
diff --git a/recipes/engine/engine_lint.expected/linux host head.json b/recipes/engine/engine_lint.expected/linux host head.json
index d91d68e..9ea2518 100644
--- a/recipes/engine/engine_lint.expected/linux host head.json
+++ b/recipes/engine/engine_lint.expected/linux host head.json
@@ -786,7 +786,7 @@
   },
   {
     "cmd": [
-      "RECIPE_REPO[depot_tools]/ninja",
+      "[CACHE]/builder/src/flutter/third_party/ninja/ninja",
       "-j",
       "1024",
       "-C",
@@ -1466,7 +1466,7 @@
   },
   {
     "cmd": [
-      "RECIPE_REPO[depot_tools]/ninja",
+      "[CACHE]/builder/src/flutter/third_party/ninja/ninja",
       "-j",
       "1024",
       "-C",
diff --git a/recipes/engine/engine_lint.expected/mac host all.json b/recipes/engine/engine_lint.expected/mac host all.json
index 16f747a..8a11bf3 100644
--- a/recipes/engine/engine_lint.expected/mac host all.json
+++ b/recipes/engine/engine_lint.expected/mac host all.json
@@ -1086,7 +1086,7 @@
   },
   {
     "cmd": [
-      "RECIPE_REPO[depot_tools]/ninja",
+      "[CACHE]/builder/src/flutter/third_party/ninja/ninja",
       "-j",
       "1024",
       "-C",
@@ -1765,7 +1765,7 @@
   },
   {
     "cmd": [
-      "RECIPE_REPO[depot_tools]/ninja",
+      "[CACHE]/builder/src/flutter/third_party/ninja/ninja",
       "-j",
       "1024",
       "-C",
diff --git a/recipes/engine/engine_lint.expected/mac host branch.json b/recipes/engine/engine_lint.expected/mac host branch.json
index 16f747a..8a11bf3 100644
--- a/recipes/engine/engine_lint.expected/mac host branch.json
+++ b/recipes/engine/engine_lint.expected/mac host branch.json
@@ -1086,7 +1086,7 @@
   },
   {
     "cmd": [
-      "RECIPE_REPO[depot_tools]/ninja",
+      "[CACHE]/builder/src/flutter/third_party/ninja/ninja",
       "-j",
       "1024",
       "-C",
@@ -1765,7 +1765,7 @@
   },
   {
     "cmd": [
-      "RECIPE_REPO[depot_tools]/ninja",
+      "[CACHE]/builder/src/flutter/third_party/ninja/ninja",
       "-j",
       "1024",
       "-C",
diff --git a/recipes/engine/engine_lint.expected/mac host head.json b/recipes/engine/engine_lint.expected/mac host head.json
index 3c2ba17..e8c2e75 100644
--- a/recipes/engine/engine_lint.expected/mac host head.json
+++ b/recipes/engine/engine_lint.expected/mac host head.json
@@ -1086,7 +1086,7 @@
   },
   {
     "cmd": [
-      "RECIPE_REPO[depot_tools]/ninja",
+      "[CACHE]/builder/src/flutter/third_party/ninja/ninja",
       "-j",
       "1024",
       "-C",
@@ -1766,7 +1766,7 @@
   },
   {
     "cmd": [
-      "RECIPE_REPO[depot_tools]/ninja",
+      "[CACHE]/builder/src/flutter/third_party/ninja/ninja",
       "-j",
       "1024",
       "-C",
diff --git a/recipes/engine/engine_lint.expected/mac ios all.json b/recipes/engine/engine_lint.expected/mac ios all.json
index 16f747a..8a11bf3 100644
--- a/recipes/engine/engine_lint.expected/mac ios all.json
+++ b/recipes/engine/engine_lint.expected/mac ios all.json
@@ -1086,7 +1086,7 @@
   },
   {
     "cmd": [
-      "RECIPE_REPO[depot_tools]/ninja",
+      "[CACHE]/builder/src/flutter/third_party/ninja/ninja",
       "-j",
       "1024",
       "-C",
@@ -1765,7 +1765,7 @@
   },
   {
     "cmd": [
-      "RECIPE_REPO[depot_tools]/ninja",
+      "[CACHE]/builder/src/flutter/third_party/ninja/ninja",
       "-j",
       "1024",
       "-C",
diff --git a/recipes/engine/engine_lint.expected/mac ios branch.json b/recipes/engine/engine_lint.expected/mac ios branch.json
index 16f747a..8a11bf3 100644
--- a/recipes/engine/engine_lint.expected/mac ios branch.json
+++ b/recipes/engine/engine_lint.expected/mac ios branch.json
@@ -1086,7 +1086,7 @@
   },
   {
     "cmd": [
-      "RECIPE_REPO[depot_tools]/ninja",
+      "[CACHE]/builder/src/flutter/third_party/ninja/ninja",
       "-j",
       "1024",
       "-C",
@@ -1765,7 +1765,7 @@
   },
   {
     "cmd": [
-      "RECIPE_REPO[depot_tools]/ninja",
+      "[CACHE]/builder/src/flutter/third_party/ninja/ninja",
       "-j",
       "1024",
       "-C",
diff --git a/recipes/engine/engine_lint.expected/mac ios head.json b/recipes/engine/engine_lint.expected/mac ios head.json
index 3c2ba17..e8c2e75 100644
--- a/recipes/engine/engine_lint.expected/mac ios head.json
+++ b/recipes/engine/engine_lint.expected/mac ios head.json
@@ -1086,7 +1086,7 @@
   },
   {
     "cmd": [
-      "RECIPE_REPO[depot_tools]/ninja",
+      "[CACHE]/builder/src/flutter/third_party/ninja/ninja",
       "-j",
       "1024",
       "-C",
@@ -1766,7 +1766,7 @@
   },
   {
     "cmd": [
-      "RECIPE_REPO[depot_tools]/ninja",
+      "[CACHE]/builder/src/flutter/third_party/ninja/ninja",
       "-j",
       "1024",
       "-C",
diff --git a/recipes/engine/engine_metrics.expected/basic_upload_metrics_False.json b/recipes/engine/engine_metrics.expected/basic_upload_metrics_False.json
index c130d42..1b717f6 100644
--- a/recipes/engine/engine_metrics.expected/basic_upload_metrics_False.json
+++ b/recipes/engine/engine_metrics.expected/basic_upload_metrics_False.json
@@ -425,7 +425,7 @@
   },
   {
     "cmd": [
-      "RECIPE_REPO[depot_tools]/ninja",
+      "[CACHE]/builder/src/flutter/third_party/ninja/ninja",
       "-j",
       "200",
       "-C",
diff --git a/recipes/engine/engine_metrics.expected/basic_upload_metrics_True.json b/recipes/engine/engine_metrics.expected/basic_upload_metrics_True.json
index 3877125..9bd8f32 100644
--- a/recipes/engine/engine_metrics.expected/basic_upload_metrics_True.json
+++ b/recipes/engine/engine_metrics.expected/basic_upload_metrics_True.json
@@ -425,7 +425,7 @@
   },
   {
     "cmd": [
-      "RECIPE_REPO[depot_tools]/ninja",
+      "[CACHE]/builder/src/flutter/third_party/ninja/ninja",
       "-j",
       "200",
       "-C",
diff --git a/recipes/engine/engine_unopt.expected/linux.json b/recipes/engine/engine_unopt.expected/linux.json
index 990bee8..6365516 100644
--- a/recipes/engine/engine_unopt.expected/linux.json
+++ b/recipes/engine/engine_unopt.expected/linux.json
@@ -809,7 +809,7 @@
   },
   {
     "cmd": [
-      "RECIPE_REPO[depot_tools]/ninja",
+      "[CACHE]/builder/src/flutter/third_party/ninja/ninja",
       "-j",
       "1024",
       "-C",
@@ -1536,7 +1536,7 @@
   },
   {
     "cmd": [
-      "RECIPE_REPO[depot_tools]/ninja",
+      "[CACHE]/builder/src/flutter/third_party/ninja/ninja",
       "-j",
       "1024",
       "-C",
@@ -2156,7 +2156,7 @@
   },
   {
     "cmd": [
-      "RECIPE_REPO[depot_tools]/ninja",
+      "[CACHE]/builder/src/flutter/third_party/ninja/ninja",
       "-j",
       "1024",
       "-C",
diff --git a/recipes/engine/engine_unopt.expected/linux_lto.json b/recipes/engine/engine_unopt.expected/linux_lto.json
index 0d781bc..36af235 100644
--- a/recipes/engine/engine_unopt.expected/linux_lto.json
+++ b/recipes/engine/engine_unopt.expected/linux_lto.json
@@ -808,7 +808,7 @@
   },
   {
     "cmd": [
-      "RECIPE_REPO[depot_tools]/ninja",
+      "[CACHE]/builder/src/flutter/third_party/ninja/ninja",
       "-j",
       "1024",
       "-C",
@@ -1534,7 +1534,7 @@
   },
   {
     "cmd": [
-      "RECIPE_REPO[depot_tools]/ninja",
+      "[CACHE]/builder/src/flutter/third_party/ninja/ninja",
       "-j",
       "1024",
       "-C",
@@ -2153,7 +2153,7 @@
   },
   {
     "cmd": [
-      "RECIPE_REPO[depot_tools]/ninja",
+      "[CACHE]/builder/src/flutter/third_party/ninja/ninja",
       "-j",
       "1024",
       "-C",
diff --git a/recipes/engine/engine_unopt.expected/mac.json b/recipes/engine/engine_unopt.expected/mac.json
index 4c07e64..8ddaad8 100644
--- a/recipes/engine/engine_unopt.expected/mac.json
+++ b/recipes/engine/engine_unopt.expected/mac.json
@@ -1066,7 +1066,7 @@
   },
   {
     "cmd": [
-      "RECIPE_REPO[depot_tools]/ninja",
+      "[CACHE]/builder/src/flutter/third_party/ninja/ninja",
       "-j",
       "1024",
       "-C",
@@ -1794,7 +1794,7 @@
   },
   {
     "cmd": [
-      "RECIPE_REPO[depot_tools]/ninja",
+      "[CACHE]/builder/src/flutter/third_party/ninja/ninja",
       "-j",
       "1024",
       "-C",
@@ -2240,7 +2240,7 @@
   },
   {
     "cmd": [
-      "RECIPE_REPO[depot_tools]/ninja",
+      "[CACHE]/builder/src/flutter/third_party/ninja/ninja",
       "-j",
       "1024",
       "-C",
diff --git a/recipes/engine/engine_unopt.expected/mac_lto.json b/recipes/engine/engine_unopt.expected/mac_lto.json
index 4c07e64..8ddaad8 100644
--- a/recipes/engine/engine_unopt.expected/mac_lto.json
+++ b/recipes/engine/engine_unopt.expected/mac_lto.json
@@ -1066,7 +1066,7 @@
   },
   {
     "cmd": [
-      "RECIPE_REPO[depot_tools]/ninja",
+      "[CACHE]/builder/src/flutter/third_party/ninja/ninja",
       "-j",
       "1024",
       "-C",
@@ -1794,7 +1794,7 @@
   },
   {
     "cmd": [
-      "RECIPE_REPO[depot_tools]/ninja",
+      "[CACHE]/builder/src/flutter/third_party/ninja/ninja",
       "-j",
       "1024",
       "-C",
@@ -2240,7 +2240,7 @@
   },
   {
     "cmd": [
-      "RECIPE_REPO[depot_tools]/ninja",
+      "[CACHE]/builder/src/flutter/third_party/ninja/ninja",
       "-j",
       "1024",
       "-C",
diff --git a/recipes/engine/engine_unopt.expected/win.json b/recipes/engine/engine_unopt.expected/win.json
index b476e77..983e4bc 100644
--- a/recipes/engine/engine_unopt.expected/win.json
+++ b/recipes/engine/engine_unopt.expected/win.json
@@ -880,7 +880,7 @@
   },
   {
     "cmd": [
-      "RECIPE_REPO[depot_tools]\\ninja.exe",
+      "[CACHE]\\builder\\src\\flutter\\third_party\\ninja\\ninja",
       "-j",
       "1024",
       "-C",
diff --git a/recipes/engine/engine_unopt.expected/win_lto.json b/recipes/engine/engine_unopt.expected/win_lto.json
index a8642fb..4b8d6d2 100644
--- a/recipes/engine/engine_unopt.expected/win_lto.json
+++ b/recipes/engine/engine_unopt.expected/win_lto.json
@@ -879,7 +879,7 @@
   },
   {
     "cmd": [
-      "RECIPE_REPO[depot_tools]\\ninja.exe",
+      "[CACHE]\\builder\\src\\flutter\\third_party\\ninja\\ninja",
       "-j",
       "1024",
       "-C",
diff --git a/recipes/engine/framework_smoke.expected/basic.json b/recipes/engine/framework_smoke.expected/basic.json
index 3a65ed6..295a4f3 100644
--- a/recipes/engine/framework_smoke.expected/basic.json
+++ b/recipes/engine/framework_smoke.expected/basic.json
@@ -349,7 +349,7 @@
   },
   {
     "cmd": [
-      "RECIPE_REPO[depot_tools]/ninja",
+      "[CACHE]/builder/src/flutter/third_party/ninja/ninja",
       "-j",
       "100",
       "-C",
diff --git a/recipes/engine/framework_smoke.expected/no_goma.json b/recipes/engine/framework_smoke.expected/no_goma.json
index 95ad075..dd0cde3 100644
--- a/recipes/engine/framework_smoke.expected/no_goma.json
+++ b/recipes/engine/framework_smoke.expected/no_goma.json
@@ -153,7 +153,7 @@
   },
   {
     "cmd": [
-      "RECIPE_REPO[depot_tools]/ninja",
+      "[CACHE]/builder/src/flutter/third_party/ninja/ninja",
       "-C",
       "[CACHE]/builder/src/out/host_debug_unopt"
     ],
diff --git a/recipes/engine/web_engine.expected/basic.json b/recipes/engine/web_engine.expected/basic.json
index 9d23ae0..ca78af7 100644
--- a/recipes/engine/web_engine.expected/basic.json
+++ b/recipes/engine/web_engine.expected/basic.json
@@ -886,7 +886,7 @@
   },
   {
     "cmd": [
-      "RECIPE_REPO[depot_tools]/autoninja",
+      "[CACHE]/builder/src/flutter/third_party/ninja/ninja",
       "-j",
       "200",
       "-C",
diff --git a/recipes/engine/web_engine.py b/recipes/engine/web_engine.py
index 34d7a03..54c3332 100644
--- a/recipes/engine/web_engine.py
+++ b/recipes/engine/web_engine.py
@@ -87,7 +87,7 @@
     builds = []
     if api.platform.is_linux:
       api.build_util.run_gn(['--build-canvaskit', '--web', '--runtime-mode=release'], checkout)
-      api.build_util.build_autoninja('wasm_release', checkout, [])
+      api.build_util.build('wasm_release', checkout, [])
       wasm_cas_hash = api.shard_util_v2.archive_full_build(
               checkout.join('out', 'wasm_release'),
               'wasm_release')
diff --git a/recipes/engine/web_engine_framework.expected/linux-pre-submit.json b/recipes/engine/web_engine_framework.expected/linux-pre-submit.json
index c386590..aa4ffc3 100644
--- a/recipes/engine/web_engine_framework.expected/linux-pre-submit.json
+++ b/recipes/engine/web_engine_framework.expected/linux-pre-submit.json
@@ -934,7 +934,7 @@
   },
   {
     "cmd": [
-      "RECIPE_REPO[depot_tools]/ninja",
+      "[CACHE]/builder/src/flutter/third_party/ninja/ninja",
       "-j",
       "200",
       "-C",
diff --git a/recipes/engine_v2/builder.expected/basic.json b/recipes/engine_v2/builder.expected/basic.json
index 076dd39..1ffd1b6 100644
--- a/recipes/engine_v2/builder.expected/basic.json
+++ b/recipes/engine_v2/builder.expected/basic.json
@@ -237,7 +237,7 @@
   },
   {
     "cmd": [
-      "RECIPE_REPO[depot_tools]/ninja",
+      "[CACHE]/builder/src/flutter/third_party/ninja/ninja",
       "-C",
       "[CACHE]/builder/src/out/ios_debug"
     ],
diff --git a/recipes/engine_v2/builder.expected/dart-internal-flutter.json b/recipes/engine_v2/builder.expected/dart-internal-flutter.json
index 34c4287..347f410 100644
--- a/recipes/engine_v2/builder.expected/dart-internal-flutter.json
+++ b/recipes/engine_v2/builder.expected/dart-internal-flutter.json
@@ -344,7 +344,7 @@
   },
   {
     "cmd": [
-      "RECIPE_REPO[depot_tools]/ninja",
+      "[CACHE]/builder/src/flutter/third_party/ninja/ninja",
       "-C",
       "[CACHE]/builder/src/out/ios_debug"
     ],
diff --git a/recipes/engine_v2/builder.expected/mac.json b/recipes/engine_v2/builder.expected/mac.json
index 2b786ff..8d123db 100644
--- a/recipes/engine_v2/builder.expected/mac.json
+++ b/recipes/engine_v2/builder.expected/mac.json
@@ -371,7 +371,7 @@
   },
   {
     "cmd": [
-      "RECIPE_REPO[depot_tools]/ninja",
+      "[CACHE]/builder/src/flutter/third_party/ninja/ninja",
       "-C",
       "[CACHE]/builder/src/out/ios_debug"
     ],
diff --git a/recipes/engine_v2/builder.expected/monorepo.json b/recipes/engine_v2/builder.expected/monorepo.json
index 39058d0..2156955 100644
--- a/recipes/engine_v2/builder.expected/monorepo.json
+++ b/recipes/engine_v2/builder.expected/monorepo.json
@@ -293,7 +293,7 @@
   },
   {
     "cmd": [
-      "RECIPE_REPO[depot_tools]/ninja",
+      "[CACHE]/builder/engine/src/flutter/third_party/ninja/ninja",
       "-C",
       "[CACHE]/builder/engine/src/out/ios_debug"
     ],
diff --git a/recipes/engine_v2/builder.expected/monorepo_tryjob.json b/recipes/engine_v2/builder.expected/monorepo_tryjob.json
index 626dea9..cfbed40 100644
--- a/recipes/engine_v2/builder.expected/monorepo_tryjob.json
+++ b/recipes/engine_v2/builder.expected/monorepo_tryjob.json
@@ -377,7 +377,7 @@
   },
   {
     "cmd": [
-      "RECIPE_REPO[depot_tools]/ninja",
+      "[CACHE]/builder/engine/src/flutter/third_party/ninja/ninja",
       "-C",
       "[CACHE]/builder/engine/src/out/ios_debug"
     ],
diff --git a/recipes/engine_v2/builder.py b/recipes/engine_v2/builder.py
index 59968f1..e86e9a4 100644
--- a/recipes/engine_v2/builder.py
+++ b/recipes/engine_v2/builder.py
@@ -68,7 +68,6 @@
   """Builds a flavor identified as a set of gn and ninja configs."""
   ninja_tool = {
       "ninja": api.build_util.build,
-      "autoninja": api.build_util.build_autoninja,
   }
   deps = api.properties.get('dependencies', [])
   api.flutter_deps.required_deps(env, env_prefixes, deps)