mirror of
https://github.com/GravitLauncher/Launcher
synced 2024-11-15 03:31:15 +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(':LauncherAPI')
|
||||
bundle project(':Radon')
|
||||
bundle 'mysql:mysql-connector-java:8.0.13'
|
||||
bundle 'jline:jline:2.14.6'
|
||||
bundle 'net.sf.proguard:proguard-base:6.0.3'
|
||||
bundle 'org.fusesource.jansi:jansi:1.17.1'
|
||||
bundle 'mysql:mysql-connector-java:8.0.16'
|
||||
bundle 'org.jline:jline:3.11.0'
|
||||
bundle 'org.jline:jline-reader:3.11.0'
|
||||
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-codec:commons-codec:1.11'
|
||||
bundle 'org.javassist:javassist:3.24.1-GA'
|
||||
bundle 'commons-codec:commons-codec:1.12'
|
||||
bundle 'org.javassist:javassist:3.25.0-GA'
|
||||
bundle 'io.netty:netty-all:4.1.36.Final'
|
||||
|
||||
bundle 'org.slf4j:slf4j-simple:1.7.25'
|
||||
|
|
|
@ -2,7 +2,9 @@
|
|||
targetCompatibility = '1.8'
|
||||
|
||||
dependencies {
|
||||
compileOnly 'org.fusesource.jansi:jansi:1.17.1'
|
||||
compileOnly 'jline:jline:2.14.6'
|
||||
compileOnly 'org.fusesource.jansi:jansi:1.18'
|
||||
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'
|
||||
}
|
||||
|
|
|
@ -1,13 +1,17 @@
|
|||
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.Output;
|
||||
|
||||
import java.io.IOException;
|
||||
|
||||
public class JLineCommandHandler extends CommandHandler {
|
||||
private final class JLineOutput implements Output {
|
||||
/*private final class JLineOutput implements Output {
|
||||
@Override
|
||||
public void println(String message) {
|
||||
try {
|
||||
|
@ -18,30 +22,38 @@ public void println(String message) {
|
|||
// Ignored
|
||||
}
|
||||
}
|
||||
}
|
||||
}*/
|
||||
|
||||
private final ConsoleReader reader;
|
||||
private final Terminal terminal;
|
||||
private final TerminalBuilder terminalBuilder;
|
||||
private final LineReader reader;
|
||||
|
||||
public JLineCommandHandler() throws IOException {
|
||||
super();
|
||||
terminalBuilder = TerminalBuilder.builder();
|
||||
terminal = terminalBuilder.build();
|
||||
reader = LineReaderBuilder.builder()
|
||||
.terminal(terminal)
|
||||
.build();
|
||||
|
||||
// Set reader
|
||||
reader = new ConsoleReader();
|
||||
reader.setExpandEvents(false);
|
||||
//reader = new ConsoleReader();
|
||||
//reader.setExpandEvents(false);
|
||||
|
||||
// Replace writer
|
||||
LogHelper.removeStdOutput();
|
||||
LogHelper.addOutput(new JLineOutput(), LogHelper.OutputTypes.JANSI);
|
||||
//LogHelper.removeStdOutput();
|
||||
//LogHelper.addOutput(new JLineOutput(), LogHelper.OutputTypes.JANSI);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void bell() throws IOException {
|
||||
reader.beep();
|
||||
|
||||
//reader.beep();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void clear() throws IOException {
|
||||
reader.clearScreen();
|
||||
terminal.puts(InfoCmp.Capability.clear_screen);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in a new issue