[flutter_tools] move gradle download failure handling into tool (#68140)

This crash affects anyone using flutter, so move it into the tool where it can be tested and documented. Ensure it works on windows devicelab too.
This commit is contained in:
Jonah Williams
2020-10-15 09:20:52 -07:00
committed by GitHub
parent e800de1a5e
commit 2321b72dfb
3 changed files with 82 additions and 7 deletions

View File

@@ -161,10 +161,5 @@ Future<void> cleanupSystem() async {
} else {
print('Could not determine JAVA_HOME; not shutting down Gradle.');
}
// Removes the .gradle directory because sometimes gradle fails in downloading
// a new version and leaves a corrupted zip archive, which could cause the
// next devicelab task to fail.
// https://github.com/flutter/flutter/issues/65277
rmTree(dir('${Platform.environment['HOME']}/.gradle'));
}
}