Skip to content

Commit 3d018b5

Browse files
Add a buildtools directory and move third_party/ninja to the project root in order to match the expectations of depot_tools (#163890)
The depot_tools Ninja wrapper looks for Ninja at specific paths within the tree. The use of "name": "." in the engine's .gclient file is not expected by the depot_tools logic for locating the engine's source directory. This PR creates an alternative layout that is supported by depot_tools. If the project root directory contains a "buildtools" subdirectory, then depot_tools will look for Ninja at "third_party/ninja" within the root. Fixes flutter/flutter#163487
1 parent 8023328 commit 3d018b5

File tree

6 files changed

+12
-2
lines changed

6 files changed

+12
-2
lines changed

DEPS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -637,7 +637,7 @@ deps = {
637637
],
638638
'dep_type': 'cipd',
639639
},
640-
'engine/src/flutter/third_party/ninja': {
640+
'third_party/ninja': {
641641
'packages': [
642642
{
643643
'package': 'infra/3pp/tools/ninja/${{platform}}',

buildtools/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
This directory is a placeholder intended to make Flutter's source tree match the expectations of [depot_tools](https://www.chromium.org/developers/how-tos/depottools/), which is used to build the Flutter engine.

dev/bots/analyze.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1632,6 +1632,7 @@ Future<void> verifyRepositoryLinks(String workingDirectory) async {
16321632
'glfw/glfw',
16331633
'GoogleCloudPlatform/artifact-registry-maven-tools',
16341634
'material-components/material-components-android', // TODO(guidezpl): remove when https://github.com/material-components/material-components-android/issues/4144 is closed
1635+
'ninja-build/ninja',
16351636
'torvalds/linux',
16361637
'tpn/winsdk-10',
16371638
};

engine/src/flutter/ci/licenses_golden/excluded_files

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2295,7 +2295,6 @@
22952295
../../../flutter/third_party/libwebp/swig
22962296
../../../flutter/third_party/libwebp/tests
22972297
../../../flutter/third_party/libwebp/webp_js
2298-
../../../flutter/third_party/ninja
22992298
../../../flutter/third_party/ocmock
23002299
../../../flutter/third_party/perfetto/.clang-format
23012300
../../../flutter/third_party/perfetto/.clang-tidy

third_party/.gitignore

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Ignore everything by default, as these come from gclient/DEPS.
2+
# We'll explicitly include the folders we want to track.
3+
/*
4+
5+
# Include the .gitignore file itself.
6+
!.gitignore
7+
8+
# Allow custom README.flutter files in each folder.
9+
**/README.flutter

0 commit comments

Comments
 (0)