Change gradle lockfile generation script to use --config-only flag (#132967)

The `generate_gradle_lockfiles.dart` script was generating the gradle wrapper by building a flavor that didn't exist. In the time since the script was written, the `--config-only` flag was created and should be used instead.

Context https://github.com/flutter/flutter/pull/132406#discussion_r1300352602
This commit is contained in:
Gray Mackall 2023-08-21 12:51:55 -07:00 committed by GitHub
parent 2b42a47724
commit 505f9d8954
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -86,13 +86,11 @@ void main(List<String> arguments) {
// Verify that the Gradlew wrapper exists.
final File gradleWrapper = androidDirectory.childFile('gradlew');
// Generate Gradle wrapper if it doesn't exists.
// This logic is embedded within the Flutter tool.
// To generate the wrapper, build a flavor that doesn't exist.
// Generate Gradle wrapper if it doesn't exist.
if (!gradleWrapper.existsSync()) {
Process.runSync(
'flutter',
<String>['build', 'apk', '--debug', '--flavor=does-not-exist'],
<String>['build', 'apk', '--config-only'],
workingDirectory: appDirectory,
);
}