fix: circular dependency on metadata when parsing
All checks were successful
tagged-release / Tagged Release (push) Successful in 2m19s

This commit is contained in:
TopchetoEU 2025-01-10 00:53:29 +02:00
parent 1d50ff14c5
commit 9668bccef1
Signed by: topchetoeu
GPG Key ID: 6531B8583E5F6ED4
2 changed files with 3 additions and 2 deletions

View File

@ -1,4 +1,4 @@
project_group = me.topchetoeu project_group = me.topchetoeu
project_name = j2s project_name = j2s
project_version = 0.10.2-beta project_version = 0.10.3-beta
main_class = me.topchetoeu.j2s.repl.SimpleRepl main_class = me.topchetoeu.j2s.repl.SimpleRepl

View File

@ -1,6 +1,7 @@
package me.topchetoeu.j2s.common; package me.topchetoeu.j2s.common;
import me.topchetoeu.j2s.common.json.JSON; import me.topchetoeu.j2s.common.json.JSON;
import me.topchetoeu.j2s.common.parsing.Filename;
public class Metadata { public class Metadata {
private static final String VERSION; private static final String VERSION;
@ -8,7 +9,7 @@ public class Metadata {
private static final String NAME; private static final String NAME;
static { static {
var data = JSON.parse(null, Reading.resourceToString("metadata.json")).map(); var data = JSON.parse(new Filename("internal", "metadata.json"), Reading.resourceToString("metadata.json")).map();
VERSION = data.string("version"); VERSION = data.string("version");
AUTHOR = data.string("author"); AUTHOR = data.string("author");
NAME = data.string("name"); NAME = data.string("name");