mirror of
https://github.com/GravitLauncher/Launcher
synced 2025-04-16 13:11:44 +03:00
[ANY] Обновление библиотек
This commit is contained in:
parent
4e27eca7fa
commit
21434b4ed6
3 changed files with 34 additions and 18 deletions
|
@ -44,13 +44,15 @@
|
||||||
pack project(':libLauncher')
|
pack project(':libLauncher')
|
||||||
pack project(':LauncherAPI')
|
pack project(':LauncherAPI')
|
||||||
bundle project(':Radon')
|
bundle project(':Radon')
|
||||||
bundle 'mysql:mysql-connector-java:8.0.13'
|
bundle 'mysql:mysql-connector-java:8.0.16'
|
||||||
bundle 'jline:jline:2.14.6'
|
bundle 'org.jline:jline:3.11.0'
|
||||||
bundle 'net.sf.proguard:proguard-base:6.0.3'
|
bundle 'org.jline:jline-reader:3.11.0'
|
||||||
bundle 'org.fusesource.jansi:jansi:1.17.1'
|
bundle 'org.jline:jline-terminal:3.11.0'
|
||||||
|
bundle 'net.sf.proguard:proguard-base:6.1.0'
|
||||||
|
bundle 'org.fusesource.jansi:jansi:1.18'
|
||||||
bundle 'commons-io:commons-io:2.6'
|
bundle 'commons-io:commons-io:2.6'
|
||||||
bundle 'commons-codec:commons-codec:1.11'
|
bundle 'commons-codec:commons-codec:1.12'
|
||||||
bundle 'org.javassist:javassist:3.24.1-GA'
|
bundle 'org.javassist:javassist:3.25.0-GA'
|
||||||
bundle 'io.netty:netty-all:4.1.36.Final'
|
bundle 'io.netty:netty-all:4.1.36.Final'
|
||||||
|
|
||||||
bundle 'org.slf4j:slf4j-simple:1.7.25'
|
bundle 'org.slf4j:slf4j-simple:1.7.25'
|
||||||
|
|
|
@ -2,7 +2,9 @@
|
||||||
targetCompatibility = '1.8'
|
targetCompatibility = '1.8'
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
compileOnly 'org.fusesource.jansi:jansi:1.17.1'
|
compileOnly 'org.fusesource.jansi:jansi:1.18'
|
||||||
compileOnly 'jline:jline:2.14.6'
|
compileOnly 'org.jline:jline:3.11.0'
|
||||||
|
compileOnly 'org.jline:jline-reader:3.11.0'
|
||||||
|
compileOnly 'org.jline:jline-terminal:3.11.0'
|
||||||
compile 'com.google.code.gson:gson:2.8.5'
|
compile 'com.google.code.gson:gson:2.8.5'
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,13 +1,17 @@
|
||||||
package ru.gravit.utils.command;
|
package ru.gravit.utils.command;
|
||||||
|
|
||||||
import jline.console.ConsoleReader;
|
import org.jline.reader.LineReader;
|
||||||
|
import org.jline.reader.LineReaderBuilder;
|
||||||
|
import org.jline.terminal.Terminal;
|
||||||
|
import org.jline.terminal.TerminalBuilder;
|
||||||
|
import org.jline.utils.InfoCmp;
|
||||||
import ru.gravit.utils.helper.LogHelper;
|
import ru.gravit.utils.helper.LogHelper;
|
||||||
import ru.gravit.utils.helper.LogHelper.Output;
|
import ru.gravit.utils.helper.LogHelper.Output;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
|
|
||||||
public class JLineCommandHandler extends CommandHandler {
|
public class JLineCommandHandler extends CommandHandler {
|
||||||
private final class JLineOutput implements Output {
|
/*private final class JLineOutput implements Output {
|
||||||
@Override
|
@Override
|
||||||
public void println(String message) {
|
public void println(String message) {
|
||||||
try {
|
try {
|
||||||
|
@ -18,30 +22,38 @@ public void println(String message) {
|
||||||
// Ignored
|
// Ignored
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}*/
|
||||||
|
|
||||||
private final ConsoleReader reader;
|
private final Terminal terminal;
|
||||||
|
private final TerminalBuilder terminalBuilder;
|
||||||
|
private final LineReader reader;
|
||||||
|
|
||||||
public JLineCommandHandler() throws IOException {
|
public JLineCommandHandler() throws IOException {
|
||||||
super();
|
super();
|
||||||
|
terminalBuilder = TerminalBuilder.builder();
|
||||||
|
terminal = terminalBuilder.build();
|
||||||
|
reader = LineReaderBuilder.builder()
|
||||||
|
.terminal(terminal)
|
||||||
|
.build();
|
||||||
|
|
||||||
// Set reader
|
// Set reader
|
||||||
reader = new ConsoleReader();
|
//reader = new ConsoleReader();
|
||||||
reader.setExpandEvents(false);
|
//reader.setExpandEvents(false);
|
||||||
|
|
||||||
// Replace writer
|
// Replace writer
|
||||||
LogHelper.removeStdOutput();
|
//LogHelper.removeStdOutput();
|
||||||
LogHelper.addOutput(new JLineOutput(), LogHelper.OutputTypes.JANSI);
|
//LogHelper.addOutput(new JLineOutput(), LogHelper.OutputTypes.JANSI);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void bell() throws IOException {
|
public void bell() throws IOException {
|
||||||
reader.beep();
|
|
||||||
|
//reader.beep();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void clear() throws IOException {
|
public void clear() throws IOException {
|
||||||
reader.clearScreen();
|
terminal.puts(InfoCmp.Capability.clear_screen);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Reference in a new issue