Retry Gradle command when failing to download a resource (#50223)

This commit is contained in:
Emmanuel Garcia
2020-02-05 17:48:04 -08:00
committed by GitHub
parent da4b5d68c4
commit eb4b6dc91b
2 changed files with 46 additions and 20 deletions

View File

@@ -108,6 +108,7 @@ final GradleHandledError networkErrorHandler = GradleHandledError(
'javax.net.ssl.SSLHandshakeException: Remote host closed connection during handshake',
'java.net.SocketException: Connection reset',
'java.io.FileNotFoundException',
'Gateway Time-out'
]),
handler: ({
String line,
@@ -116,8 +117,8 @@ final GradleHandledError networkErrorHandler = GradleHandledError(
bool shouldBuildPluginAsAar,
}) async {
globals.printError(
'$warningMark Gradle threw an error while trying to update itself. '
'Retrying the update...'
'$warningMark Gradle threw an error while downloading artifacts from the network. '
'Retrying to download...'
);
return GradleBuildStatus.retry;
},