From 25b46a47558ffafa5ccd0f526bdfa42f8feaa299 Mon Sep 17 00:00:00 2001 From: Username404 Date: Sun, 21 Nov 2021 14:33:16 +0100 Subject: [PATCH] Update kotlin to the 1.6.0 version and update ktor to the 1.6.5 version --- build.gradle.kts | 9 ++++++--- gradle.properties | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/build.gradle.kts b/build.gradle.kts index f643076..b2e40cd 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,5 +1,5 @@ plugins { - id("org.jetbrains.kotlin.js") version "1.5.20" + id("org.jetbrains.kotlin.js") version "1.6.0" } group = "fr.username404" @@ -22,8 +22,11 @@ kotlin { moduleName = "Username404_Website" compilations.all { with(languageSettings) { - apiVersion = coreLibrariesVersion.substring(0..2) - languageVersion = (apiVersion!!.toDouble() + 0.1).toString() + val secondDot = coreLibrariesVersion.let { it.indexOf('.', startIndex = it.indexOf('.') + 1) } + apiVersion = coreLibrariesVersion.run { + substring(0 until secondDot).also { println(it) } + } + languageVersion = apiVersion!!.substringBefore('.') + '.' + (apiVersion!!.substringAfter('.').toInt() + 1).toString() progressiveMode = true } with(kotlinOptions) { diff --git a/gradle.properties b/gradle.properties index 59dae48..30c7813 100644 --- a/gradle.properties +++ b/gradle.properties @@ -8,4 +8,4 @@ org.gradle.unsafe.configuration-cache=on org.gradle.vfs.watch=true kotlinx-html_version=0.7.3 -ktor_version=1.6.0 \ No newline at end of file +ktor_version=1.6.5 \ No newline at end of file