update kotlin

This commit is contained in:
creeper123123321 2021-05-06 19:16:02 -03:00
parent f7e16a16df
commit 6b23a6e62f
4 changed files with 9 additions and 9 deletions

View File

@ -3,9 +3,9 @@ import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
`java-library`
application
kotlin("jvm") version "1.4.32"
kotlin("jvm") version "1.5.0"
id("maven-publish")
id("com.github.johnrengelman.shadow") version "6.1.0"
id("com.github.johnrengelman.shadow") version "7.0.0"
id("com.github.ben-manes.versions") version "0.38.0"
id("com.palantir.git-version") version "0.12.3"
}
@ -65,7 +65,7 @@ dependencies {
implementation("org.jline:jline-terminal-jansi:3.19.0")
implementation("org.apache.commons:commons-compress:1.20")
val ktorVersion = "1.5.3"
val ktorVersion = "1.5.4"
implementation(kotlin("stdlib-jdk8"))
implementation("io.ktor:ktor-network-tls-certificates:$ktorVersion")
implementation("io.ktor:ktor-server-netty:$ktorVersion")

View File

@ -48,7 +48,7 @@ class VIAaaSAddress {
}?.toString()
if (option != null) {
val arg = part.substring(2)
when (option.toLowerCase(Locale.ROOT)) {
when (option.lowercase()) {
"p" -> port = arg.toInt()
"o" -> online = when {
arg.startsWith("t", ignoreCase = true) -> true

View File

@ -39,7 +39,7 @@ object VIAaaSConsole : SimpleTerminalConsole(), ViaCommandSender {
candidates.addAll(commands.keys.filter { it.startsWith(alias, ignoreCase = true) }
.map { Candidate(it) })
} else {
val command = commands[alias.toLowerCase()]
val command = commands[alias.lowercase()]
if (command != null) {
candidates.addAll(command.suggest(this, alias, args).map(::Candidate))
}
@ -53,7 +53,7 @@ object VIAaaSConsole : SimpleTerminalConsole(), ViaCommandSender {
override fun runCommand(commandLine: String) {
val cmd = commandLine.split(" ")
try {
val alias = cmd[0].toLowerCase()
val alias = cmd[0].lowercase()
val args = cmd.subList(1, cmd.size)
val command = commands[alias]
if (command == null) {