[devicelab] Remove ~/.gradle after each devicelab task run (#65434)

This commit is contained in:
Tong Wu
2020-09-09 01:50:03 -07:00
committed by GitHub
parent 54ade88365
commit abeaf11829

View File

@@ -157,4 +157,9 @@ 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'));
}