mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
Stop Gradle daemon before attempting to delete Flutter project (#15819)
This commit is contained in:
parent
061352918b
commit
145abb6dbf
@ -89,6 +89,16 @@ class FlutterProject {
|
||||
}
|
||||
|
||||
Future<Null> delete() async {
|
||||
if (Platform.isWindows) {
|
||||
// A running Gradle daemon might prevent us from deleting the project
|
||||
// folder on Windows.
|
||||
await inDirectory(
|
||||
new Directory(path.join(rootPath, 'android')),
|
||||
() async {
|
||||
exec('gradlew.bat', <String>['--stop'], canFail: true);
|
||||
},
|
||||
);
|
||||
}
|
||||
await parent.delete(recursive: true);
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user