From f2783ceea23147d2702c47c9b47c06ad7fc707a8 Mon Sep 17 00:00:00 2001 From: Linnea Gräf Date: Tue, 7 Jan 2025 13:01:39 +0100 Subject: fix: Long ItemIds.java blocking IDE indexing --- build.gradle.kts | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index 84ab31d..a5173a1 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -181,19 +181,13 @@ abstract class GenerateItemIds : DefaultTask() { writer.appendLine(" * Automatically generated {@link ItemId} list.") writer.appendLine(" */") writer.appendLine("@org.jspecify.annotations.NullMarked") - writer.appendLine("public class ItemIds {") + writer.appendLine("public interface ItemIds {") val gson = Gson() for (item in items) { - val itemJson = gson.fromJson(item.file.readText(), JsonObject::class.java) writer.appendLine("\t/**") - writer.appendLine("\t * ") - writer.appendLine("\t * ") - writer.appendLine("\t * ") - writer.appendLine("\t * ") - writer.appendLine("\t *
Display Name{@code ${itemJson["displayname"].asString}}
Vanilla Item{@code ${itemJson["itemid"].asString}}
Internal Name{@code ${itemJson["internalname"].asString}}
") writer.appendLine("\t * @see JSON definition") writer.appendLine("\t */") - writer.appendLine("\tpublic static final ItemId ${item.javaName} =" + + writer.appendLine("\tItemId ${item.javaName} =" + " ItemId.forName(${gson.toJson(item.id)});") } writer.appendLine("}") @@ -235,7 +229,7 @@ abstract class RepoDownload : DefaultTask() { } val downloadRepo by tasks.register("downloadRepo", RepoDownload::class) { - hash.set("725ddb8") + hash.set("dcf1dbc") } val generateItemIds by tasks.register("generateItemIds", GenerateItemIds::class) { -- cgit