diff --git a/DEPS b/DEPS index 7996f13867..589686e683 100644 --- a/DEPS +++ b/DEPS @@ -637,7 +637,7 @@ deps = { ], 'dep_type': 'cipd', }, - 'engine/src/flutter/third_party/ninja': { + 'third_party/ninja': { 'packages': [ { 'package': 'infra/3pp/tools/ninja/${{platform}}', diff --git a/buildtools/README.md b/buildtools/README.md new file mode 100644 index 0000000000..3d0b26bc8e --- /dev/null +++ b/buildtools/README.md @@ -0,0 +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. diff --git a/dev/bots/analyze.dart b/dev/bots/analyze.dart index eca1f1e98c..b46863f43d 100644 --- a/dev/bots/analyze.dart +++ b/dev/bots/analyze.dart @@ -1632,6 +1632,7 @@ Future verifyRepositoryLinks(String workingDirectory) async { 'glfw/glfw', 'GoogleCloudPlatform/artifact-registry-maven-tools', 'material-components/material-components-android', // TODO(guidezpl): remove when https://github.com/material-components/material-components-android/issues/4144 is closed + 'ninja-build/ninja', 'torvalds/linux', 'tpn/winsdk-10', }; diff --git a/engine/src/flutter/ci/licenses_golden/excluded_files b/engine/src/flutter/ci/licenses_golden/excluded_files index 4656ce3d33..88cb1dd294 100644 --- a/engine/src/flutter/ci/licenses_golden/excluded_files +++ b/engine/src/flutter/ci/licenses_golden/excluded_files @@ -2295,7 +2295,6 @@ ../../../flutter/third_party/libwebp/swig ../../../flutter/third_party/libwebp/tests ../../../flutter/third_party/libwebp/webp_js -../../../flutter/third_party/ninja ../../../flutter/third_party/ocmock ../../../flutter/third_party/perfetto/.clang-format ../../../flutter/third_party/perfetto/.clang-tidy diff --git a/engine/src/flutter/tools/pkg/engine_build_configs/lib/src/build_config_runner.dart b/engine/src/flutter/tools/pkg/engine_build_configs/lib/src/build_config_runner.dart index cbf155a699..b021fa115d 100644 --- a/engine/src/flutter/tools/pkg/engine_build_configs/lib/src/build_config_runner.dart +++ b/engine/src/flutter/tools/pkg/engine_build_configs/lib/src/build_config_runner.dart @@ -583,8 +583,7 @@ final class BuildRunner extends Runner { bool success = false; try { final String ninjaPath = p.join( - engineSrcDir.path, - 'flutter', + engineSrcDir.parent.parent.path, 'third_party', 'ninja', 'ninja', diff --git a/engine/src/flutter/tools/pkg/engine_build_configs/test/build_config_runner_test.dart b/engine/src/flutter/tools/pkg/engine_build_configs/test/build_config_runner_test.dart index 8131293816..0fdc588745 100644 --- a/engine/src/flutter/tools/pkg/engine_build_configs/test/build_config_runner_test.dart +++ b/engine/src/flutter/tools/pkg/engine_build_configs/test/build_config_runner_test.dart @@ -116,7 +116,8 @@ void main() { // Check that the events for the Ninja command are correct. expect(events[2] is RunnerStart, isTrue); expect(events[2].name, equals('$buildName: ninja')); - expect(events[2].command[0], contains('ninja')); + final String rootPath = path.dirname(path.dirname(engine.srcDir.path)); + expect(events[2].command[0], equals('$rootPath/third_party/ninja/ninja')); final String configPath = '${engine.srcDir.path}/out/${targetBuild.ninja.config}'; expect(events[2].command.contains(configPath), isTrue); for (final String target in targetBuild.ninja.targets) { diff --git a/third_party/.gitignore b/third_party/.gitignore new file mode 100644 index 0000000000..b528e9e24b --- /dev/null +++ b/third_party/.gitignore @@ -0,0 +1,9 @@ +# Ignore everything by default, as these come from gclient/DEPS. +# We'll explicitly include the folders we want to track. +/* + +# Include the .gitignore file itself. +!.gitignore + +# Allow custom README.flutter files in each folder. +**/README.flutter diff --git a/engine/src/flutter/third_party/ninja/README.flutter b/third_party/ninja/README.flutter similarity index 100% rename from engine/src/flutter/third_party/ninja/README.flutter rename to third_party/ninja/README.flutter