diff --git a/launcher-bootstrap/build.gradle b/launcher-bootstrap/build.gradle index c165d7b..872063e 100644 --- a/launcher-bootstrap/build.gradle +++ b/launcher-bootstrap/build.gradle @@ -10,7 +10,7 @@ application { dependencies { implementation 'com.googlecode.json-simple:json-simple:1.1.1' - implementation 'javax.xml.bind:jaxb-api:2.3.0' + implementation 'javax.xml.bind:jaxb-api:2.3.1' } processResources { diff --git a/launcher-builder/build.gradle b/launcher-builder/build.gradle index 91ddff4..008cfa6 100644 --- a/launcher-builder/build.gradle +++ b/launcher-builder/build.gradle @@ -11,8 +11,7 @@ application { dependencies { api project(':launcher') - implementation 'org.tukaani:xz:1.0' - implementation 'org.apache.commons:commons-compress:1.9' + implementation 'org.apache.commons:commons-compress:1.21' } shadowJar { diff --git a/launcher-builder/src/main/java/com/skcraft/launcher/builder/PackageBuilder.java b/launcher-builder/src/main/java/com/skcraft/launcher/builder/PackageBuilder.java index 92f54fd..6b85f98 100644 --- a/launcher-builder/src/main/java/com/skcraft/launcher/builder/PackageBuilder.java +++ b/launcher-builder/src/main/java/com/skcraft/launcher/builder/PackageBuilder.java @@ -367,7 +367,7 @@ public class PackageBuilder { private static BuilderOptions parseArgs(String[] args) { BuilderOptions options = new BuilderOptions(); - new JCommander(options, args); + new JCommander(options).parse(args); options.choosePaths(); return options; } diff --git a/launcher/build.gradle b/launcher/build.gradle index 8d1cff4..28c4bc6 100644 --- a/launcher/build.gradle +++ b/launcher/build.gradle @@ -10,18 +10,17 @@ application { } dependencies { - api 'javax.xml.bind:jaxb-api:2.2.4' - api 'com.fasterxml.jackson.core:jackson-databind:2.3.0' + api 'javax.xml.bind:jaxb-api:2.3.1' + api 'com.fasterxml.jackson.core:jackson-databind:2.13.2.2' api 'commons-lang:commons-lang:2.6' api 'commons-io:commons-io:1.2' api 'com.google.guava:guava:15.0' - api 'com.beust:jcommander:1.32' + api 'com.beust:jcommander:1.82' api 'com.miglayout:miglayout:3.7.4' - api 'com.google.code.findbugs:jsr305:3.0.0' + api 'com.google.code.findbugs:jsr305:3.0.2' implementation 'com.googlecode.plist:dd-plist:1.23' - - implementation 'net.java.dev.jna:jna-platform:5.10.0' + implementation 'net.java.dev.jna:jna-platform:5.11.0' } processResources { diff --git a/launcher/src/main/java/com/skcraft/launcher/Launcher.java b/launcher/src/main/java/com/skcraft/launcher/Launcher.java index b2c9508..962f64f 100644 --- a/launcher/src/main/java/com/skcraft/launcher/Launcher.java +++ b/launcher/src/main/java/com/skcraft/launcher/Launcher.java @@ -415,7 +415,7 @@ public final class Launcher { */ public static Launcher createFromArguments(String[] args) throws ParameterException, IOException { LauncherArguments options = new LauncherArguments(); - new JCommander(options, args); + new JCommander(options).parse(args); Integer bsVersion = options.getBootstrapVersion(); log.info(bsVersion != null ? "Bootstrap version " + bsVersion + " detected" : "Not bootstrapped"); diff --git a/launcher/src/main/java/com/skcraft/launcher/auth/MicrosoftLoginService.java b/launcher/src/main/java/com/skcraft/launcher/auth/MicrosoftLoginService.java index b79aa32..5244b2a 100644 --- a/launcher/src/main/java/com/skcraft/launcher/auth/MicrosoftLoginService.java +++ b/launcher/src/main/java/com/skcraft/launcher/auth/MicrosoftLoginService.java @@ -1,7 +1,7 @@ package com.skcraft.launcher.auth; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.databind.PropertyNamingStrategy; +import com.fasterxml.jackson.databind.PropertyNamingStrategies; import com.fasterxml.jackson.databind.annotation.JsonNaming; import com.skcraft.launcher.auth.microsoft.MicrosoftWebAuthorizer; import com.skcraft.launcher.auth.microsoft.MinecraftServicesAuthorizer; @@ -163,7 +163,7 @@ public class MicrosoftLoginService implements LoginService { } @Data - @JsonNaming(PropertyNamingStrategy.LowerCaseWithUnderscoresStrategy.class) + @JsonNaming(PropertyNamingStrategies.SnakeCaseStrategy.class) @JsonIgnoreProperties(ignoreUnknown = true) private static class TokenError { private String error; diff --git a/launcher/src/main/java/com/skcraft/launcher/auth/microsoft/model/McAuthResponse.java b/launcher/src/main/java/com/skcraft/launcher/auth/microsoft/model/McAuthResponse.java index 768c05f..c047d12 100644 --- a/launcher/src/main/java/com/skcraft/launcher/auth/microsoft/model/McAuthResponse.java +++ b/launcher/src/main/java/com/skcraft/launcher/auth/microsoft/model/McAuthResponse.java @@ -2,12 +2,12 @@ package com.skcraft.launcher.auth.microsoft.model; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.databind.PropertyNamingStrategy; +import com.fasterxml.jackson.databind.PropertyNamingStrategies; import com.fasterxml.jackson.databind.annotation.JsonNaming; import lombok.Data; @Data -@JsonNaming(PropertyNamingStrategy.LowerCaseWithUnderscoresStrategy.class) +@JsonNaming(PropertyNamingStrategies.SnakeCaseStrategy.class) @JsonIgnoreProperties(ignoreUnknown = true) public class McAuthResponse { private String accessToken; diff --git a/launcher/src/main/java/com/skcraft/launcher/auth/microsoft/model/TokenResponse.java b/launcher/src/main/java/com/skcraft/launcher/auth/microsoft/model/TokenResponse.java index d6aeb60..2348afc 100644 --- a/launcher/src/main/java/com/skcraft/launcher/auth/microsoft/model/TokenResponse.java +++ b/launcher/src/main/java/com/skcraft/launcher/auth/microsoft/model/TokenResponse.java @@ -1,12 +1,12 @@ package com.skcraft.launcher.auth.microsoft.model; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.databind.PropertyNamingStrategy; +import com.fasterxml.jackson.databind.PropertyNamingStrategies; import com.fasterxml.jackson.databind.annotation.JsonNaming; import lombok.Data; @Data -@JsonNaming(PropertyNamingStrategy.LowerCaseWithUnderscoresStrategy.class) +@JsonNaming(PropertyNamingStrategies.SnakeCaseStrategy.class) @JsonIgnoreProperties(ignoreUnknown = true) public class TokenResponse { private String tokenType; diff --git a/launcher/src/main/java/com/skcraft/launcher/auth/microsoft/model/XblAuthProperties.java b/launcher/src/main/java/com/skcraft/launcher/auth/microsoft/model/XblAuthProperties.java index 1414687..9891875 100644 --- a/launcher/src/main/java/com/skcraft/launcher/auth/microsoft/model/XblAuthProperties.java +++ b/launcher/src/main/java/com/skcraft/launcher/auth/microsoft/model/XblAuthProperties.java @@ -1,12 +1,12 @@ package com.skcraft.launcher.auth.microsoft.model; -import com.fasterxml.jackson.databind.PropertyNamingStrategy; +import com.fasterxml.jackson.databind.PropertyNamingStrategies; import com.fasterxml.jackson.databind.annotation.JsonNaming; import lombok.Data; import lombok.NonNull; @Data -@JsonNaming(PropertyNamingStrategy.PascalCaseStrategy.class) +@JsonNaming(PropertyNamingStrategies.UpperCamelCaseStrategy.class) public class XblAuthProperties { private String authMethod = "RPS"; private String siteName = "user.auth.xboxlive.com"; diff --git a/launcher/src/main/java/com/skcraft/launcher/auth/microsoft/model/XboxAuthRequest.java b/launcher/src/main/java/com/skcraft/launcher/auth/microsoft/model/XboxAuthRequest.java index 53c4498..3888357 100644 --- a/launcher/src/main/java/com/skcraft/launcher/auth/microsoft/model/XboxAuthRequest.java +++ b/launcher/src/main/java/com/skcraft/launcher/auth/microsoft/model/XboxAuthRequest.java @@ -1,12 +1,12 @@ package com.skcraft.launcher.auth.microsoft.model; -import com.fasterxml.jackson.databind.PropertyNamingStrategy; +import com.fasterxml.jackson.databind.PropertyNamingStrategies; import com.fasterxml.jackson.databind.annotation.JsonNaming; import lombok.Data; import lombok.NonNull; @Data -@JsonNaming(PropertyNamingStrategy.PascalCaseStrategy.class) +@JsonNaming(PropertyNamingStrategies.UpperCamelCaseStrategy.class) public class XboxAuthRequest { @NonNull private T properties; private String relyingParty = "http://auth.xboxlive.com"; diff --git a/launcher/src/main/java/com/skcraft/launcher/auth/microsoft/model/XboxAuthResponse.java b/launcher/src/main/java/com/skcraft/launcher/auth/microsoft/model/XboxAuthResponse.java index c7893a8..e989e38 100644 --- a/launcher/src/main/java/com/skcraft/launcher/auth/microsoft/model/XboxAuthResponse.java +++ b/launcher/src/main/java/com/skcraft/launcher/auth/microsoft/model/XboxAuthResponse.java @@ -2,14 +2,14 @@ package com.skcraft.launcher.auth.microsoft.model; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.databind.PropertyNamingStrategy; +import com.fasterxml.jackson.databind.PropertyNamingStrategies; import com.fasterxml.jackson.databind.annotation.JsonNaming; import lombok.Data; import java.util.List; @Data -@JsonNaming(PropertyNamingStrategy.PascalCaseStrategy.class) +@JsonNaming(PropertyNamingStrategies.UpperCamelCaseStrategy.class) @JsonIgnoreProperties(ignoreUnknown = true) public class XboxAuthResponse { private String token; diff --git a/launcher/src/main/java/com/skcraft/launcher/auth/microsoft/model/XstsAuthProperties.java b/launcher/src/main/java/com/skcraft/launcher/auth/microsoft/model/XstsAuthProperties.java index 63fcef8..5d59693 100644 --- a/launcher/src/main/java/com/skcraft/launcher/auth/microsoft/model/XstsAuthProperties.java +++ b/launcher/src/main/java/com/skcraft/launcher/auth/microsoft/model/XstsAuthProperties.java @@ -1,6 +1,6 @@ package com.skcraft.launcher.auth.microsoft.model; -import com.fasterxml.jackson.databind.PropertyNamingStrategy; +import com.fasterxml.jackson.databind.PropertyNamingStrategies; import com.fasterxml.jackson.databind.annotation.JsonNaming; import lombok.Data; @@ -8,7 +8,7 @@ import java.util.Collections; import java.util.List; @Data -@JsonNaming(PropertyNamingStrategy.PascalCaseStrategy.class) +@JsonNaming(PropertyNamingStrategies.UpperCamelCaseStrategy.class) public class XstsAuthProperties { private String sandboxId = "RETAIL"; private List userTokens; diff --git a/launcher/src/main/java/com/skcraft/launcher/auth/microsoft/model/XstsError.java b/launcher/src/main/java/com/skcraft/launcher/auth/microsoft/model/XstsError.java index d279d42..aec313f 100644 --- a/launcher/src/main/java/com/skcraft/launcher/auth/microsoft/model/XstsError.java +++ b/launcher/src/main/java/com/skcraft/launcher/auth/microsoft/model/XstsError.java @@ -2,12 +2,12 @@ package com.skcraft.launcher.auth.microsoft.model; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import com.fasterxml.jackson.databind.PropertyNamingStrategy; +import com.fasterxml.jackson.databind.PropertyNamingStrategies; import com.fasterxml.jackson.databind.annotation.JsonNaming; import lombok.Data; @Data -@JsonNaming(PropertyNamingStrategy.PascalCaseStrategy.class) +@JsonNaming(PropertyNamingStrategies.UpperCamelCaseStrategy.class) @JsonIgnoreProperties(ignoreUnknown = true) public class XstsError { @JsonProperty("XErr") diff --git a/launcher/src/main/java/com/skcraft/launcher/model/minecraft/mapper/ArgumentValueDeserializer.java b/launcher/src/main/java/com/skcraft/launcher/model/minecraft/mapper/ArgumentValueDeserializer.java index 7bf74d4..de99313 100644 --- a/launcher/src/main/java/com/skcraft/launcher/model/minecraft/mapper/ArgumentValueDeserializer.java +++ b/launcher/src/main/java/com/skcraft/launcher/model/minecraft/mapper/ArgumentValueDeserializer.java @@ -30,6 +30,6 @@ public class ArgumentValueDeserializer extends StdDeserializer> { return Lists.newArrayList(value); } - throw new InvalidFormatException("Invalid JSON type for deserializer (not string or array)", null, List.class); + throw new InvalidFormatException(jp, "Invalid JSON type for deserializer (not string or array)", null, List.class); } } diff --git a/launcher/src/main/java/com/skcraft/launcher/model/minecraft/mapper/MinecraftArgumentsDeserializer.java b/launcher/src/main/java/com/skcraft/launcher/model/minecraft/mapper/MinecraftArgumentsDeserializer.java index a6436a2..f297d37 100644 --- a/launcher/src/main/java/com/skcraft/launcher/model/minecraft/mapper/MinecraftArgumentsDeserializer.java +++ b/launcher/src/main/java/com/skcraft/launcher/model/minecraft/mapper/MinecraftArgumentsDeserializer.java @@ -26,6 +26,6 @@ public class MinecraftArgumentsDeserializer extends StdDeserializer T asJson(TypeReference type) throws IOException { + public T asJson(TypeReference type) throws IOException { return mapper.readValue(asString("UTF-8"), type); }