Retry Gradle command when failing to download a resource (#50223)
This commit is contained in:
@@ -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;
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user