diff --git a/LaunchServer/build.gradle b/LaunchServer/build.gradle index ffe79a90..baadb9cd 100644 --- a/LaunchServer/build.gradle +++ b/LaunchServer/build.gradle @@ -10,6 +10,9 @@ maven { url "https://jcenter.bintray.com/" } + maven { + url "https://jitpack.io/" + } } sourceCompatibility = '17' @@ -72,6 +75,7 @@ task cleanjar(type: Jar, dependsOn: jar) { dependencies { pack project(':LauncherAPI') bundle group: 'me.tongfei', name: 'progressbar', version: '0.9.2' + bundle group: 'com.github.Marcono1234', name: 'gson-record-type-adapter-factory', version: 'v0.1.0' bundle group: 'org.fusesource.jansi', name: 'jansi', version: rootProject['verJansi'] bundle group: 'org.jline', name: 'jline', version: rootProject['verJline'] bundle group: 'org.jline', name: 'jline-reader', version: rootProject['verJline'] diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/manangers/LaunchServerGsonManager.java b/LaunchServer/src/main/java/pro/gravit/launchserver/manangers/LaunchServerGsonManager.java index fdadd9f5..4d79195f 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/manangers/LaunchServerGsonManager.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/manangers/LaunchServerGsonManager.java @@ -1,6 +1,7 @@ package pro.gravit.launchserver.manangers; import com.google.gson.GsonBuilder; +import marcono1234.gson.recordadapter.RecordTypeAdapterFactory; import pro.gravit.launcher.events.request.GetAvailabilityAuthRequestEvent; import pro.gravit.launcher.managers.GsonManager; import pro.gravit.launcher.modules.events.PreGsonPhase; @@ -33,6 +34,7 @@ public LaunchServerGsonManager(LaunchServerModulesManager modulesManager) { @Override public void registerAdapters(GsonBuilder builder) { super.registerAdapters(builder); + builder.registerTypeAdapterFactory(RecordTypeAdapterFactory.DEFAULT); builder.registerTypeAdapter(TextureProvider.class, new UniversalJsonAdapter<>(TextureProvider.providers)); builder.registerTypeAdapter(AuthCoreProvider.class, new UniversalJsonAdapter<>(AuthCoreProvider.providers)); builder.registerTypeAdapter(PasswordVerifier.class, new UniversalJsonAdapter<>(PasswordVerifier.providers)); diff --git a/build.gradle b/build.gradle index 3cdcbab6..8f1e2912 100644 --- a/build.gradle +++ b/build.gradle @@ -27,6 +27,9 @@ maven { url "https://jcenter.bintray.com/" } + maven { + url "https://jitpack.io/" + } } jar {