From c273dc396ee4a0fb5d13dea88ca94d0a86eb85c0 Mon Sep 17 00:00:00 2001 From: 33 Date: Wed, 1 Nov 2023 13:39:37 +0800 Subject: [PATCH] feat: fix upload --- .../gradle/storage/StorageService.java | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/buildSrc/src/main/java/customskinloader/gradle/storage/StorageService.java b/buildSrc/src/main/java/customskinloader/gradle/storage/StorageService.java index 5fcd4cd..88ff1f0 100644 --- a/buildSrc/src/main/java/customskinloader/gradle/storage/StorageService.java +++ b/buildSrc/src/main/java/customskinloader/gradle/storage/StorageService.java @@ -3,6 +3,7 @@ import com.google.gson.Gson; import com.google.gson.GsonBuilder; +import java.io.File; import java.io.IOException; import java.nio.charset.StandardCharsets; import java.nio.file.Files; @@ -29,6 +30,16 @@ public static void put(String key, Path file) { storages.forEach(it -> it.put(key, file)); } + /** + * Put file to all storage. + * + * @param key key + * @param file file + */ + public static void put(String key, File file) { + put(key, file.toPath()); + } + private static final Gson gson = new GsonBuilder().setPrettyPrinting().create(); /**