Unverified Commit 505f9d89 authored by Gray Mackall's avatar Gray Mackall Committed by GitHub

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
parent 2b42a477
...@@ -86,13 +86,11 @@ void main(List<String> arguments) { ...@@ -86,13 +86,11 @@ void main(List<String> arguments) {
// Verify that the Gradlew wrapper exists. // Verify that the Gradlew wrapper exists.
final File gradleWrapper = androidDirectory.childFile('gradlew'); final File gradleWrapper = androidDirectory.childFile('gradlew');
// Generate Gradle wrapper if it doesn't exists. // Generate Gradle wrapper if it doesn't exist.
// This logic is embedded within the Flutter tool.
// To generate the wrapper, build a flavor that doesn't exist.
if (!gradleWrapper.existsSync()) { if (!gradleWrapper.existsSync()) {
Process.runSync( Process.runSync(
'flutter', 'flutter',
<String>['build', 'apk', '--debug', '--flavor=does-not-exist'], <String>['build', 'apk', '--config-only'],
workingDirectory: appDirectory, workingDirectory: appDirectory,
); );
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment