diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/binary/tasks/MainBuildTask.java b/LaunchServer/src/main/java/pro/gravit/launchserver/binary/tasks/MainBuildTask.java index 0b3a87bf..478217ec 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/binary/tasks/MainBuildTask.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/binary/tasks/MainBuildTask.java @@ -124,7 +124,8 @@ protected void initProps() { properties.put("runtimeconfig.secureCheckSalt", launcherSalt); if (server.runtime.unlockSecret == null) server.runtime.unlockSecret = SecurityHelper.randomStringToken(); properties.put("runtimeconfig.unlockSecret", server.runtime.unlockSecret); - + server.runtime.buildNumber++; + properties.put("runtimeconfig.buildNumber", server.runtime.buildNumber); } public byte[] transformClass(byte[] bytes, String classname, BuildContext context) { diff --git a/LaunchServer/src/main/java/pro/gravit/launchserver/config/LaunchServerRuntimeConfig.java b/LaunchServer/src/main/java/pro/gravit/launchserver/config/LaunchServerRuntimeConfig.java index 0f9c9c53..756fa2cf 100644 --- a/LaunchServer/src/main/java/pro/gravit/launchserver/config/LaunchServerRuntimeConfig.java +++ b/LaunchServer/src/main/java/pro/gravit/launchserver/config/LaunchServerRuntimeConfig.java @@ -11,6 +11,7 @@ public class LaunchServerRuntimeConfig { public String unlockSecret; public String registerApiKey; public String clientCheckSecret; + public long buildNumber; public void verify() { if (passwordEncryptKey == null) logger.error("[RuntimeConfig] passwordEncryptKey must not be null"); @@ -25,5 +26,6 @@ public void reset() { runtimeEncryptKey = SecurityHelper.randomStringAESKey(); registerApiKey = SecurityHelper.randomStringToken(); clientCheckSecret = SecurityHelper.randomStringToken(); + buildNumber = 0; } } diff --git a/LauncherAPI/src/main/java/pro/gravit/launcher/LauncherConfig.java b/LauncherAPI/src/main/java/pro/gravit/launcher/LauncherConfig.java index 0d90c99d..0e57587d 100644 --- a/LauncherAPI/src/main/java/pro/gravit/launcher/LauncherConfig.java +++ b/LauncherAPI/src/main/java/pro/gravit/launcher/LauncherConfig.java @@ -48,6 +48,8 @@ public final class LauncherConfig extends StreamObject { public String unlockSecret; @LauncherInject("launchercore.env") public LauncherEnvironment environment; + @LauncherInject("runtimeconfig.buildNumber") + public long buildNumber; @LauncherInjectionConstructor diff --git a/modules b/modules index ed433be2..b9ec7706 160000 --- a/modules +++ b/modules @@ -1 +1 @@ -Subproject commit ed433be234a5d6b4336a6af48194add97b0f2874 +Subproject commit b9ec7706081097211c4fa9cd7a6669a4dadac6aa