mirror of
https://github.com/architectury/architectury-loom.git
synced 2026-04-03 05:57:42 -05:00
Rengenerate and download all files with --refresh-dependencies (#227)
* Re generate all files with --refresh-dependencies * Always re-process jar processors * Update mixin compile extensions
This commit is contained in:
@@ -36,6 +36,8 @@ import org.gradle.api.Project;
|
||||
import org.gradle.api.logging.Logger;
|
||||
|
||||
public class DownloadUtil {
|
||||
public static boolean refreshDeps = false;
|
||||
|
||||
/**
|
||||
* Download from the given {@link URL} to the given {@link File} so long as there are differences between them.
|
||||
*
|
||||
@@ -60,6 +62,11 @@ public class DownloadUtil {
|
||||
public static void downloadIfChanged(URL from, File to, Logger logger, boolean quiet) throws IOException {
|
||||
HttpURLConnection connection = (HttpURLConnection) from.openConnection();
|
||||
|
||||
if (refreshDeps) {
|
||||
getETagFile(to).delete();
|
||||
to.delete();
|
||||
}
|
||||
|
||||
//If the output already exists we'll use it's last modified time
|
||||
if (to.exists()) {
|
||||
connection.setIfModifiedSince(to.lastModified());
|
||||
|
||||
Reference in New Issue
Block a user