Skip to content

Commit 1d25f69

Browse files
Reland "Add a buildtools directory and move third_party/ninja to the project root in order to match the expectations of depot_tools" (flutter#164240)
Relands flutter#163890 and updates the Ninja path used by the engine tool
1 parent 0f3b092 commit 1d25f69

File tree

8 files changed

+15
-5
lines changed

8 files changed

+15
-5
lines changed

DEPS

+1-1
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

+1
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

+1
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

-1
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

engine/src/flutter/tools/pkg/engine_build_configs/lib/src/build_config_runner.dart

+1-2
Original file line numberDiff line numberDiff line change
@@ -583,8 +583,7 @@ final class BuildRunner extends Runner {
583583
bool success = false;
584584
try {
585585
final String ninjaPath = p.join(
586-
engineSrcDir.path,
587-
'flutter',
586+
engineSrcDir.parent.parent.path,
588587
'third_party',
589588
'ninja',
590589
'ninja',

engine/src/flutter/tools/pkg/engine_build_configs/test/build_config_runner_test.dart

+2-1
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,8 @@ void main() {
116116
// Check that the events for the Ninja command are correct.
117117
expect(events[2] is RunnerStart, isTrue);
118118
expect(events[2].name, equals('$buildName: ninja'));
119-
expect(events[2].command[0], contains('ninja'));
119+
final String rootPath = path.dirname(path.dirname(engine.srcDir.path));
120+
expect(events[2].command[0], equals('$rootPath/third_party/ninja/ninja'));
120121
final String configPath = '${engine.srcDir.path}/out/${targetBuild.ninja.config}';
121122
expect(events[2].command.contains(configPath), isTrue);
122123
for (final String target in targetBuild.ninja.targets) {

third_party/.gitignore

+9
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)