mirror of
https://github.com/SKCraft/Launcher.git
synced 2024-11-27 12:46:22 +01:00
Upgrade dependencies & fix deprecations
This commit is contained in:
parent
54c05d1f9b
commit
868426498f
@ -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 {
|
||||
|
@ -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 {
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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 {
|
||||
|
@ -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");
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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";
|
||||
|
@ -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<T> {
|
||||
@NonNull private T properties;
|
||||
private String relyingParty = "http://auth.xboxlive.com";
|
||||
|
@ -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;
|
||||
|
@ -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<String> userTokens;
|
||||
|
@ -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")
|
||||
|
@ -30,6 +30,6 @@ public class ArgumentValueDeserializer extends StdDeserializer<List<String>> {
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
@ -26,6 +26,6 @@ public class MinecraftArgumentsDeserializer extends StdDeserializer<GameArgument
|
||||
return new GameArgument(argument);
|
||||
}
|
||||
|
||||
throw new InvalidFormatException("Invalid JSON type for deserializer (not string or object)", null, GameArgument.class);
|
||||
throw new InvalidFormatException(jp, "Invalid JSON type for deserializer (not string or object)", null, GameArgument.class);
|
||||
}
|
||||
}
|
||||
|
@ -7,8 +7,8 @@
|
||||
package com.skcraft.launcher.persistence;
|
||||
|
||||
import com.fasterxml.jackson.core.PrettyPrinter;
|
||||
import com.fasterxml.jackson.core.util.DefaultIndenter;
|
||||
import com.fasterxml.jackson.core.util.DefaultPrettyPrinter;
|
||||
import com.fasterxml.jackson.core.util.DefaultPrettyPrinter.Lf2SpacesIndenter;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import com.google.common.io.ByteSink;
|
||||
import com.google.common.io.ByteSource;
|
||||
@ -43,7 +43,7 @@ public final class Persistence {
|
||||
|
||||
static {
|
||||
L2F_LIST_PRETTY_PRINTER = new DefaultPrettyPrinter();
|
||||
L2F_LIST_PRETTY_PRINTER.indentArraysWith(Lf2SpacesIndenter.instance);
|
||||
L2F_LIST_PRETTY_PRINTER.indentArraysWith(DefaultIndenter.SYSTEM_LINEFEED_INSTANCE);
|
||||
}
|
||||
|
||||
private Persistence() {
|
||||
|
@ -558,7 +558,7 @@ public class HttpRequest implements Closeable, ProgressObservable {
|
||||
* @return the object
|
||||
* @throws java.io.IOException on I/O error
|
||||
*/
|
||||
public <T> T asJson(TypeReference type) throws IOException {
|
||||
public <T> T asJson(TypeReference<T> type) throws IOException {
|
||||
return mapper.readValue(asString("UTF-8"), type);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user