[FEATURE] Grand libraries update

This commit is contained in:
Gravita 2021-03-19 23:02:03 +07:00
parent 344c61eaee
commit b545c099eb
7 changed files with 23 additions and 81 deletions

View file

@ -6,8 +6,6 @@
import pro.gravit.launchserver.command.auth.UsernameToUUIDCommand; import pro.gravit.launchserver.command.auth.UsernameToUUIDCommand;
import pro.gravit.launchserver.command.basic.*; import pro.gravit.launchserver.command.basic.*;
import pro.gravit.launchserver.command.hash.*; import pro.gravit.launchserver.command.hash.*;
import pro.gravit.launchserver.command.install.CheckInstallCommand;
import pro.gravit.launchserver.command.install.MultiCommand;
import pro.gravit.launchserver.command.modules.LoadModuleCommand; import pro.gravit.launchserver.command.modules.LoadModuleCommand;
import pro.gravit.launchserver.command.modules.ModulesCommand; import pro.gravit.launchserver.command.modules.ModulesCommand;
import pro.gravit.launchserver.command.service.*; import pro.gravit.launchserver.command.service.*;
@ -64,8 +62,6 @@ public static void registerCommands(pro.gravit.utils.command.CommandHandler hand
BaseCommandCategory service = new BaseCommandCategory(); BaseCommandCategory service = new BaseCommandCategory();
service.registerCommand("config", new ConfigCommand(server)); service.registerCommand("config", new ConfigCommand(server));
service.registerCommand("serverStatus", new ServerStatusCommand(server)); service.registerCommand("serverStatus", new ServerStatusCommand(server));
service.registerCommand("checkInstall", new CheckInstallCommand(server));
service.registerCommand("multi", new MultiCommand(server));
service.registerCommand("notify", new NotifyCommand(server)); service.registerCommand("notify", new NotifyCommand(server));
service.registerCommand("component", new ComponentCommand(server)); service.registerCommand("component", new ComponentCommand(server));
service.registerCommand("clients", new ClientsCommand(server)); service.registerCommand("clients", new ClientsCommand(server));

View file

@ -1,28 +0,0 @@
package pro.gravit.launchserver.command.install;
import pro.gravit.launchserver.LaunchServer;
import pro.gravit.launchserver.command.Command;
import pro.gravit.utils.helper.JVMHelper;
import pro.gravit.utils.helper.LogHelper;
public class CheckInstallCommand extends Command {
public CheckInstallCommand(LaunchServer server) {
super(server);
}
@Override
public String getArgsDescription() {
return null;
}
@Override
public String getUsageDescription() {
return null;
}
@Override
public void invoke(String... args) {
LogHelper.info("Check install success");
JVMHelper.RUNTIME.exit(0);
}
}

View file

@ -1,27 +0,0 @@
package pro.gravit.launchserver.command.install;
import pro.gravit.launchserver.LaunchServer;
import pro.gravit.launchserver.command.Command;
public class MultiCommand extends Command {
public MultiCommand(LaunchServer server) {
super(server);
}
@Override
public String getArgsDescription() {
return null;
}
@Override
public String getUsageDescription() {
return null;
}
@Override
public void invoke(String... args) {
for (String arg : args) {
server.commandHandler.eval(arg, false);
}
}
}

View file

@ -8,6 +8,8 @@
import oshi.software.os.OperatingSystem; import oshi.software.os.OperatingSystem;
import pro.gravit.launcher.request.secure.HardwareReportRequest; import pro.gravit.launcher.request.secure.HardwareReportRequest;
import java.util.List;
public class HWIDProvider { public class HWIDProvider {
public final SystemInfo systemInfo; public final SystemInfo systemInfo;
public final OperatingSystem system; public final OperatingSystem system;
@ -41,13 +43,13 @@ public int getProcessorLogicalCount() {
} }
public boolean isBattery() { public boolean isBattery() {
PowerSource[] powerSources = hardware.getPowerSources(); List<PowerSource> powerSources = hardware.getPowerSources();
return powerSources != null && powerSources.length != 0; return powerSources != null && powerSources.size() != 0;
} }
//Hardware Information //Hardware Information
public String getHWDiskID() { public String getHWDiskID() {
HWDiskStore[] hwDiskStore = hardware.getDiskStores(); List<HWDiskStore> hwDiskStore = hardware.getDiskStores();
long size = 0; long size = 0;
HWDiskStore maxStore = null; HWDiskStore maxStore = null;
for (HWDiskStore store : hwDiskStore) { for (HWDiskStore store : hwDiskStore) {
@ -63,8 +65,8 @@ public String getHWDiskID() {
} }
public byte[] getDisplayID() { public byte[] getDisplayID() {
Display[] displays = hardware.getDisplays(); List<Display> displays = hardware.getDisplays();
if (displays == null || displays.length == 0) return null; if (displays == null || displays.size() == 0) return null;
for (Display display : displays) { for (Display display : displays) {
return display.getEdid(); return display.getEdid();
} }

View file

@ -6,7 +6,7 @@
compileOnly group: 'org.jline', name: 'jline', version: rootProject['verJline'] compileOnly group: 'org.jline', name: 'jline', version: rootProject['verJline']
compileOnly group: 'org.jline', name: 'jline-reader', version: rootProject['verJline'] compileOnly group: 'org.jline', name: 'jline-reader', version: rootProject['verJline']
compileOnly group: 'org.jline', name: 'jline-terminal', version: rootProject['verJline'] compileOnly group: 'org.jline', name: 'jline-terminal', version: rootProject['verJline']
compileOnly group: 'org.bouncycastle', name: 'bcprov-jdk15', version: rootProject['verBcprov'] compileOnly group: 'org.bouncycastle', name: 'bcprov-jdk15on', version: rootProject['verBcprov']
api group: 'com.google.code.gson', name: 'gson', version: rootProject['verGson'] api group: 'com.google.code.gson', name: 'gson', version: rootProject['verGson']
testImplementation group: 'org.junit.jupiter', name: 'junit-jupiter', version: rootProject['verJunit'] testImplementation group: 'org.junit.jupiter', name: 'junit-jupiter', version: rootProject['verJunit']
testImplementation group: 'org.jline', name: 'jline', version: rootProject['verJline'] testImplementation group: 'org.jline', name: 'jline', version: rootProject['verJline']

View file

@ -2,7 +2,6 @@
import org.fusesource.jansi.Ansi; import org.fusesource.jansi.Ansi;
import org.fusesource.jansi.AnsiConsole; import org.fusesource.jansi.AnsiConsole;
import org.fusesource.jansi.AnsiOutputStream;
import pro.gravit.launcher.LauncherNetworkAPI; import pro.gravit.launcher.LauncherNetworkAPI;
import java.io.*; import java.io.*;
@ -409,7 +408,7 @@ public OutputEnity(Output output, OutputTypes type) {
private static final class JAnsiOutput extends WriterOutput { private static final class JAnsiOutput extends WriterOutput {
private JAnsiOutput(OutputStream output) { private JAnsiOutput(OutputStream output) {
super(IOHelper.newWriter(new AnsiOutputStream(output))); super(IOHelper.newWriter(output));
} }
} }

View file

@ -1,18 +1,18 @@
project.ext { project.ext {
verAsm = '7.3.1' verAsm = '9.1'
verNetty = '4.1.48.Final' verNetty = '4.1.60.Final'
verOshiCore = '4.5.2' verOshiCore = '5.6.0'
verJunit = '5.6.1' verJunit = '5.7.1'
verGuavaC = '28.2-jre' verGuavaC = '30.1-jre'
verJansi = '1.18' verJansi = '2.3.2'
verJline = '3.14.0' verJline = '3.19.0'
verBcprov = '1.46' verBcprov = '1.68'
verGson = '2.8.6' verGson = '2.8.6'
verBcpkix = '1.61' verBcpkix = '1.68'
verSlf4j = '1.7.25' verSlf4j = '1.7.30'
verMySQLConn = '8.0.19' verMySQLConn = '8.0.23'
verPostgreSQLConn = '42.2.11' verPostgreSQLConn = '42.2.19'
verProguard = '6.2.2' verProguard = '6.2.2'
verLaunch4j = '3.12' verLaunch4j = '3.14'
verHibernate = '5.4.21.Final' verHibernate = '5.4.29.Final'
} }