Rewrite download utils (#681)

- eTag support (It seems Mojang's CDN and our meta/maven do not support this right now)
- Age based caching.
- Sha1 based caching.
- HTTP(S) proxy settings should now be respected.
- The downloader has better awareness of offline mode and refresh deps, cleaning up the calling code a bit.
- Uses the new Java 11 HTTP client, provides async support for downloading multiple files
- Progress handling (TODO needs hooking up to gradle)
- Better compression support. Handled by [Methanol](https://mizosoft.github.io/methanol/) 
- Unit tested with a real web server.
This commit is contained in:
modmuss50
2022-07-25 18:01:11 +01:00
committed by GitHub
parent 4bc7e39149
commit c4c6de23e3
40 changed files with 1440 additions and 896 deletions

View File

@@ -46,6 +46,7 @@ import net.fabricmc.loom.configuration.providers.minecraft.mapped.IntermediaryMi
import net.fabricmc.loom.configuration.providers.minecraft.mapped.NamedMinecraftProvider;
import net.fabricmc.loom.extension.LoomFiles;
import net.fabricmc.loom.extension.MixinExtension;
import net.fabricmc.loom.util.download.DownloadBuilder;
public interface LoomGradleExtension extends LoomGradleExtensionAPI {
static LoomGradleExtension get(Project project) {
@@ -106,4 +107,6 @@ public interface LoomGradleExtension extends LoomGradleExtensionAPI {
List<AccessWidenerFile> getTransitiveAccessWideners();
void addTransitiveAccessWideners(List<AccessWidenerFile> accessWidenerFiles);
DownloadBuilder download(String url);
}