diff --git a/ide-plugin/build.gradle.kts b/ide-plugin/build.gradle.kts index 62951b0b..aaae5df8 100644 --- a/ide-plugin/build.gradle.kts +++ b/ide-plugin/build.gradle.kts @@ -50,8 +50,10 @@ java { tasks.withType().configureEach { - kotlinOptions.jvmTarget = targetJvm - kotlinOptions.apiVersion = "1.4" + compilerOptions { + jvmTarget.set(org.jetbrains.kotlin.gradle.dsl.JvmTarget.fromTarget(targetJvm)) + apiVersion.set(org.jetbrains.kotlin.gradle.dsl.KotlinVersion.KOTLIN_1_9) + } } tasks.getByName("buildSearchableOptions").enabled = false diff --git a/server/build.gradle.kts b/server/build.gradle.kts index a359bdb9..17e32b6a 100644 --- a/server/build.gradle.kts +++ b/server/build.gradle.kts @@ -26,9 +26,9 @@ java { } tasks.withType().configureEach { - kotlinOptions { - jvmTarget = targetJvm - apiVersion = "1.5" + compilerOptions { + jvmTarget.set(org.jetbrains.kotlin.gradle.dsl.JvmTarget.fromTarget(targetJvm)) + apiVersion.set(org.jetbrains.kotlin.gradle.dsl.KotlinVersion.KOTLIN_1_9) } } diff --git a/server/src/test/kotlin/cloud/skadi/ApplicationTest.kt b/server/src/test/kotlin/cloud/skadi/ApplicationTest.kt index b5195118..68d336c1 100644 --- a/server/src/test/kotlin/cloud/skadi/ApplicationTest.kt +++ b/server/src/test/kotlin/cloud/skadi/ApplicationTest.kt @@ -20,7 +20,7 @@ class ApplicationTest { withTestApplication({ testModuleSetup(dbName) }) { handleRequest(HttpMethod.Get, "/").apply { assertEquals(HttpStatusCode.OK, response.status()) - val document = Jsoup.parse(response.content) + val document = Jsoup.parse(response.content!!) val firstLinkInMenu = document.selectFirst("#menu > a") assertNotNull(firstLinkInMenu) assertEquals("Login", firstLinkInMenu.text()) @@ -37,7 +37,7 @@ class ApplicationTest { login() handleRequest(HttpMethod.Get, "/").apply { assertEquals(HttpStatusCode.OK, response.status()) - val document = Jsoup.parse(response.content) + val document = Jsoup.parse(response.content!!) val firstLinkInMenu = document.selectFirst("#menu > ul > li:nth-child(1) > a") assertNotNull(firstLinkInMenu) assertEquals("Settings", firstLinkInMenu.text()) @@ -266,7 +266,7 @@ class ApplicationTest { login() val gistUrl = testGist() val csrfToken = handleRequest(HttpMethod.Get, gistUrl.encodedPath + "/delete").run { - val document = Jsoup.parse(response.content) + val document = Jsoup.parse(response.content!!) val csrf = document.selectFirst("body > div.container > form > input[type=\"hidden\"]:nth-child(2)") csrf?.attr("value")!! @@ -290,7 +290,7 @@ class ApplicationTest { login() val gistUrl = testGist() val csrfToken = handleRequest(HttpMethod.Get, gistUrl.encodedPath + "/delete").run { - val document = Jsoup.parse(response.content) + val document = Jsoup.parse(response.content!!) val csrf = document.selectFirst("body > div.container > form > input[type=\"hidden\"]:nth-child(2)") csrf?.attr("value")!! @@ -316,7 +316,7 @@ class ApplicationTest { login() val gistUrl = testGist() val csrfToken = handleRequest(HttpMethod.Get, gistUrl.encodedPath + "/delete").run { - val document = Jsoup.parse(response.content) + val document = Jsoup.parse(response.content!!) val csrf = document.selectFirst("body > div.container > form > input[type=\"hidden\"]:nth-child(2)") csrf?.attr("value")!! diff --git a/shared/build.gradle b/shared/build.gradle index 6d85f2d6..8848e33b 100644 --- a/shared/build.gradle +++ b/shared/build.gradle @@ -15,11 +15,15 @@ java { } compileKotlin { - kotlinOptions.jvmTarget = targetJvm - kotlinOptions.apiVersion = "1.4" + compilerOptions { + jvmTarget = org.jetbrains.kotlin.gradle.dsl.JvmTarget.fromTarget(targetJvm) + apiVersion = org.jetbrains.kotlin.gradle.dsl.KotlinVersion.KOTLIN_1_9 + } } compileTestKotlin { - kotlinOptions.jvmTarget = targetJvm - kotlinOptions.apiVersion = "1.4" + compilerOptions { + jvmTarget = org.jetbrains.kotlin.gradle.dsl.JvmTarget.fromTarget(targetJvm) + apiVersion = org.jetbrains.kotlin.gradle.dsl.KotlinVersion.KOTLIN_1_9 + } }