From 2c0a4f2d44a5d624f977e3cb86af64516ad96e57 Mon Sep 17 00:00:00 2001 From: Gray Mackall <34871572+gmackall@users.noreply.github.com> Date: Thu, 26 Sep 2024 15:58:06 -0700 Subject: [PATCH] Use flutter from in same repo (not path) in `generate_gradle_lockfiles.dart` (#155790) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Should hopefully fix https://github.com/flutter/flutter/issues/155704 🙏 --- dev/tools/bin/generate_gradle_lockfiles.dart | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/dev/tools/bin/generate_gradle_lockfiles.dart b/dev/tools/bin/generate_gradle_lockfiles.dart index 9ca5702141..10fd873363 100644 --- a/dev/tools/bin/generate_gradle_lockfiles.dart +++ b/dev/tools/bin/generate_gradle_lockfiles.dart @@ -179,7 +179,11 @@ void main(List arguments) { final String appDirectory = androidDirectory.parent.absolute.path; // Fetch pub dependencies. - exec('flutter', ['pub', 'get'], workingDirectory: appDirectory); + final String flutterPath = repoRoot + .childDirectory('bin') + .childFile('flutter') + .path; + exec(flutterPath, ['pub', 'get'], workingDirectory: appDirectory); // Verify that the Gradlew wrapper exists. final File gradleWrapper = androidDirectory.childFile('gradlew');