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:
parent
2b42a47724
commit
505f9d8954
@ -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,
|
||||
);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user