It’s quite normal that for a large package to be downloaded in a unreliable network. Gradle will try to download them from scratch if the first try was failed.
Is it possible to support partial downloading? So next time I just need to download the remaining part of the file.
This request is similar to below issue, however it just talking about the wrapper, not the packages, but I believe the solution should be the same.
https://issues.gradle.org/browse/GRADLE-3008
And below is the particular issue I have with my network, I can do nothing with it, but hope maybe someone can help on this feature (Please notice that I modified the link url so I can make this post)
$ wget -c https~//repo1.maven.org/maven2/org/aspectj/aspectjweaver/1.8.5/aspectjweaver-1.8.5.jar
–2015-08-02 12:53:27-- https~//repo1.maven.org/maven2/org/aspectj/aspectjweaver/1.8.5/aspectjweaver-1.8.5.jar
Resolving repo1.maven.org (repo1.maven.org)… 199.27.79.209
Connecting to repo1.maven.org (repo1.maven.org)|199.27.79.209|:443… connected.
HTTP request sent, awaiting response… 200 OK
Length: 1863302 (1.8M) [application/java-archive]
Saving to: ‘aspectjweaver-1.8.5.jar’
aspectjweaver-1.8.5.jar 7%[===> ] 143.58K 3.38KB/s in 42s
2015-08-02 12:55:44 (3.38 KB/s) - Read error at byte 147023/1863302 (A TLS packet with unexpected length was received.). Retrying.
–2015-08-02 12:55:45-- (try: 2) https~//repo1.maven.org/maven2/org/aspectj/aspectjweaver/1.8.5/aspectjweaver-1.8.5.jar
Connecting to repo1.maven.org (repo1.maven.org)|199.27.79.209|:443… connected.
HTTP request sent, awaiting response… 206 Partial Content
Length: 1863302 (1.8M), 1716279 (1.6M) remaining [application/java-archive]
Saving to: ‘aspectjweaver-1.8.5.jar’
aspectjweaver-1.8.5.jar 17%[++++====> ] 319.10K 1.46KB/s in 2m 0s s
2015-08-02 12:58:39 (1.46 KB/s) - Read error at byte 326758/1863302 (A TLS packet with unexpected length was received.). Retrying.
–2015-08-02 12:58:41-- (try: 3) https~//repo1.maven.org/maven2/org/aspectj/aspectjweaver/1.8.5/aspectjweaver-1.8.5.jar
Connecting to repo1.maven.org (repo1.maven.org)|199.27.79.209|:443… connected.
HTTP request sent, awaiting response… 206 Partial Content
Length: 1863302 (1.8M), 1536544 (1.5M) remaining [application/java-archive]
Saving to: ‘aspectjweaver-1.8.5.jar’
aspectjweaver-1.8.5.jar 29%[+++++++++=====> ] 542.00K 1.36KB/s in 2m 44s s
2015-08-02 13:01:47 (1.36 KB/s) - Read error at byte 555004/1863302 (A TLS packet with unexpected length was received.). Retrying.
–2015-08-02 13:01:50-- (try: 4) https~//repo1.maven.org/maven2/org/aspectj/aspectjweaver/1.8.5/aspectjweaver-1.8.5.jar
Connecting to repo1.maven.org (repo1.maven.org)|199.27.79.209|:443… connected.
HTTP request sent, awaiting response… 206 Partial Content
Length: 1863302 (1.8M), 1308298 (1.2M) remaining [application/java-archive]
Saving to: ‘aspectjweaver-1.8.5.jar’
aspectjweaver-1.8.5.jar 50%[+++++++++++++++==========> ] 925.52K 1.13KB/s in 4m 52s s
2015-08-02 13:07:55 (1.31 KB/s) - Read error at byte 947731/1863302 (A TLS packet with unexpected length was received.). Retrying.
–2015-08-02 13:07:59-- (try: 5) https~//repo1.maven.org/maven2/org/aspectj/aspectjweaver/1.8.5/aspectjweaver-1.8.5.jar
Connecting to repo1.maven.org (repo1.maven.org)|199.27.79.209|:443… connected.
HTTP request sent, awaiting response… 206 Partial Content
Length: 1863302 (1.8M), 915571 (894K) remaining [application/java-archive]
Saving to: ‘aspectjweaver-1.8.5.jar’
aspectjweaver-1.8.5.jar 100%[++++++++++++++++++++++++++=========================>] 1.78M 2.62KB/s in 3m 49s
2015-08-02 13:11:49 (3.90 KB/s) - ‘aspectjweaver-1.8.5.jar’ saved [1863302/1863302]