migrate to version catalog

This commit is contained in:
Alexander Nozik 2024-08-20 10:18:57 +03:00
parent 7d0cab4a7e
commit 13874bde53
3 changed files with 77 additions and 22 deletions

View File

@ -1,11 +1,7 @@
val kotlin_version: String by project
val logback_version: String by project
val kotlinx_html_version: String by project
plugins {
kotlin("jvm") version "2.0.10"
id("io.ktor.plugin") version "2.3.12"
id("org.jetbrains.kotlin.plugin.serialization") version "2.0.10"
alias(libs.plugins.kotlin.jvm)
alias(libs.plugins.kotlin.serialization)
alias(libs.plugins.ktor)
}
group = "center.sciprog"
@ -24,19 +20,19 @@ repositories {
}
dependencies {
implementation("io.ktor:ktor-server-core-jvm")
implementation("io.ktor:ktor-server-websockets-jvm")
implementation("io.ktor:ktor-server-host-common-jvm")
implementation("io.ktor:ktor-server-status-pages-jvm")
implementation("io.ktor:ktor-server-cors-jvm")
implementation("io.ktor:ktor-server-content-negotiation-jvm")
implementation("io.ktor:ktor-serialization-kotlinx-json-jvm")
implementation("io.ktor:ktor-server-html-builder-jvm")
implementation("org.jetbrains.kotlinx:kotlinx-html-jvm:$kotlinx_html_version")
implementation("org.jetbrains:kotlin-css-jvm:1.0.0-pre.129-kotlin-1.4.20")
implementation("io.ktor:ktor-server-cio-jvm")
implementation("ch.qos.logback:logback-classic:$logback_version")
implementation("io.ktor:ktor-server-config-yaml")
testImplementation("io.ktor:ktor-server-test-host-jvm")
testImplementation("org.jetbrains.kotlin:kotlin-test-junit:$kotlin_version")
implementation(libs.ktor.server.core.jvm)
implementation(libs.ktor.server.websockets.jvm)
implementation(libs.ktor.server.host.common.jvm)
implementation(libs.ktor.server.status.pages.jvm)
implementation(libs.ktor.server.cors.jvm)
implementation(libs.ktor.server.content.negotiation.jvm)
implementation(libs.ktor.serialization.kotlinx.json.jvm)
implementation(libs.ktor.server.html.builder.jvm)
implementation(libs.kotlinx.html.jvm)
implementation(libs.kotlin.css.jvm)
implementation(libs.ktor.server.cio.jvm)
implementation(libs.logback.classic)
implementation(libs.ktor.server.config.yaml)
testImplementation(libs.ktor.server.test.host.jvm)
testImplementation(libs.kotlin.test.junit)
}

55
gradle/libs.versions.toml Normal file
View File

@ -0,0 +1,55 @@
[versions]
kotlin = "2.0.10"
ktor = "2.3.12"
kotlinx-html = "0.10.1"
[plugins]
kotlin-jvm = { id = "org.jetbrains.kotlin.jvm", version = "2.0.10" }
ktor = { id = "io.ktor.plugin", version = "2.3.12" }
kotlin-serialization = { id = "org.jetbrains.kotlin.plugin.serialization", version = "2.0.10" }
[libraries]
ktor-bom = { group = "io.ktor", name = "ktor-bom", version.ref = "ktor" }
ktor-server-core-jvm = { module = "io.ktor:ktor-server-core-jvm" }
ktor-server-websockets-jvm = { module = "io.ktor:ktor-server-websockets-jvm" }
ktor-server-host-common-jvm = { module = "io.ktor:ktor-server-host-common-jvm" }
ktor-server-status-pages-jvm = { module = "io.ktor:ktor-server-status-pages-jvm" }
ktor-server-cors-jvm = { module = "io.ktor:ktor-server-cors-jvm" }
ktor-server-content-negotiation-jvm = { module = "io.ktor:ktor-server-content-negotiation-jvm" }
ktor-serialization-kotlinx-json-jvm = { module = "io.ktor:ktor-serialization-kotlinx-json-jvm" }
ktor-server-html-builder-jvm = { module = "io.ktor:ktor-server-html-builder-jvm" }
kotlinx-html-jvm = { group = "org.jetbrains.kotlinx", name = "kotlinx-html-jvm", version.ref = "kotlinx-html" }
kotlin-css-jvm = "org.jetbrains:kotlin-css-jvm:1.0.0-pre.129-kotlin-1.4.20"
ktor-server-cio-jvm = { module = "io.ktor:ktor-server-cio-jvm" }
logback-classic = "ch.qos.logback:logback-classic:1.4.14"
ktor-server-config-yaml = { module = "io.ktor:ktor-server-config-yaml" }
kotlin-build-tools-impl = { module = "org.jetbrains.kotlin:kotlin-build-tools-impl" }
kotlin-scripting-compiler-embeddable = { group = "org.jetbrains.kotlin", name = "kotlin-scripting-compiler-embeddable", version.ref = "kotlin" }
kotlin-serialization-compiler-plugin-embeddable = { group = "org.jetbrains.kotlin", name = "kotlin-serialization-compiler-plugin-embeddable", version.ref = "kotlin" }
ktor-server-test-host-jvm = { module = "io.ktor:ktor-server-test-host-jvm" }
kotlin-test-junit = { group = "org.jetbrains.kotlin", name = "kotlin-test-junit", version.ref = "kotlin" }

View File

@ -1 +1,5 @@
rootProject.name = "ktor-reactive-sample"
plugins{
id("de.fayard.refreshVersions") version "0.60.5"
}