Update Login URL handling and optimize ShadowJar build process
- Fix `resolveLogin` method to ensure correct login endpoint formatting. - Update default `LOGIN_CODE_ENDPOINT` in `Config` to reflect new API path. - Adjust ShadowJar build to transform SLF4J service files and exclude SLF4J dependencies during minimization.
This commit is contained in:
parent
4e66e00eae
commit
f42777c62a
|
|
@ -45,7 +45,13 @@ tasks.withType<ShadowJar> {
|
||||||
relocate("kotlin", "com.alttd.webinterface.shaded.kotlin")
|
relocate("kotlin", "com.alttd.webinterface.shaded.kotlin")
|
||||||
relocate("org.eclipse.jetty", "com.alttd.webinterface.shaded.org.eclipse.jetty")
|
relocate("org.eclipse.jetty", "com.alttd.webinterface.shaded.org.eclipse.jetty")
|
||||||
|
|
||||||
minimize()
|
// Transform service files for SLF4J to use the relocated packages
|
||||||
|
transform(com.github.jengelman.gradle.plugins.shadow.transformers.ServiceFileTransformer::class.java)
|
||||||
|
|
||||||
|
minimize {
|
||||||
|
// Exclude SLF4J to prevent minimization from removing required classes
|
||||||
|
exclude(dependency("org.slf4j:.*:.*"))
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
tasks.build {
|
tasks.build {
|
||||||
|
|
|
||||||
|
|
@ -70,7 +70,7 @@ public class Login {
|
||||||
|
|
||||||
private @NotNull String resolveLogin(String message, String loginCode) {
|
private @NotNull String resolveLogin(String message, String loginCode) {
|
||||||
return message
|
return message
|
||||||
.replace("<login_endpoint>", Config.LOGIN_ENDPOINT)
|
.replace("<login_endpoint>", Config.LOGIN_ENDPOINT + "/")
|
||||||
.replace("<code>", loginCode);
|
.replace("<code>", loginCode);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -192,14 +192,14 @@ public final class Config {
|
||||||
APPEAL_MESSAGE = getString("messages.appeal-message", APPEAL_MESSAGE);
|
APPEAL_MESSAGE = getString("messages.appeal-message", APPEAL_MESSAGE);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String YOUR_LOGIN_CODE = "<green>Log in on <gold><click:open_url:'<login_endpoint>/<code>'>alttd.com</click>" +
|
public static String YOUR_LOGIN_CODE = "<green>Log in on <gold><click:open_url:'<login_endpoint><code>'>" +
|
||||||
"</gold> with code: <code></green>";
|
"alttd.com</click></gold> with code: <code></green>";
|
||||||
|
|
||||||
private static void login_messages() {
|
private static void login_messages() {
|
||||||
YOUR_LOGIN_CODE = getString("messages.your-login-code", YOUR_LOGIN_CODE);
|
YOUR_LOGIN_CODE = getString("messages.your-login-code", YOUR_LOGIN_CODE);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String LOGIN_CODE_ENDPOINT = "https://alttd.com/login/requestNewUserLogin/<uuid>";
|
public static String LOGIN_CODE_ENDPOINT = "https://alttd.com/api/login/requestNewUserLogin/<uuid>";
|
||||||
public static String LOGIN_ENDPOINT = "https://alttd.com/login";
|
public static String LOGIN_ENDPOINT = "https://alttd.com/login";
|
||||||
public static String DOWNLOAD_ENDPOINT = "https://alttd.com/particles/download";
|
public static String DOWNLOAD_ENDPOINT = "https://alttd.com/particles/download";
|
||||||
public static String SECRET = "";
|
public static String SECRET = "";
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user