From 9a40d4f3404010b53b6ceacd17a346d42c98a6e0 Mon Sep 17 00:00:00 2001 From: InsanusMokrassar Date: Wed, 20 Mar 2024 00:48:26 +0600 Subject: [PATCH] exclude ktor/rsocket/dataforge versions --- build.gradle.kts | 5 ----- controls-core/build.gradle.kts | 2 +- controls-magix/build.gradle.kts | 2 +- controls-ports-ktor/build.gradle.kts | 4 +--- controls-server/build.gradle.kts | 15 ++++++--------- .../controls-xodus/build.gradle.kts | 4 +--- demo/all-things/build.gradle.kts | 5 +---- demo/car/build.gradle.kts | 5 +---- demo/echo/build.gradle.kts | 5 +---- demo/many-devices/build.gradle.kts | 5 +---- gradle/libs.versions.toml | 17 +++++++++++++++++ magix/magix-rsocket/build.gradle.kts | 9 ++++----- magix/magix-server/build.gradle.kts | 5 ++--- .../magix-storage-xodus/build.gradle.kts | 4 +--- settings.gradle.kts | 11 +++++++++++ 15 files changed, 49 insertions(+), 49 deletions(-) create mode 100644 gradle/libs.versions.toml diff --git a/build.gradle.kts b/build.gradle.kts index df7c664..02dde8d 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -6,11 +6,6 @@ plugins { id("space.kscience.gradle.project") } -val dataforgeVersion: String by extra("0.6.2-dev-3") -val ktorVersion: String by extra(space.kscience.gradle.KScienceVersions.ktorVersion) -val rsocketVersion by extra("0.15.4") -val xodusVersion by extra("2.0.1") - allprojects { group = "space.kscience" version = "0.2.0" diff --git a/controls-core/build.gradle.kts b/controls-core/build.gradle.kts index bbe32eb..05bb084 100644 --- a/controls-core/build.gradle.kts +++ b/controls-core/build.gradle.kts @@ -21,7 +21,7 @@ kscience { } useContextReceivers() dependencies { - api("space.kscience:dataforge-io:$dataforgeVersion") + api(libs.dataforge.io) api(spclibs.kotlinx.datetime) } } diff --git a/controls-magix/build.gradle.kts b/controls-magix/build.gradle.kts index 0296b8c..f0a6339 100644 --- a/controls-magix/build.gradle.kts +++ b/controls-magix/build.gradle.kts @@ -18,7 +18,7 @@ kscience { dependencies { api(projects.magix.magixApi) api(projects.controlsCore) - api("com.benasher44:uuid:0.8.0") + api(libs.uuid) } } diff --git a/controls-ports-ktor/build.gradle.kts b/controls-ports-ktor/build.gradle.kts index 4c8ad9a..1f1efda 100644 --- a/controls-ports-ktor/build.gradle.kts +++ b/controls-ports-ktor/build.gradle.kts @@ -9,11 +9,9 @@ description = """ Implementation of byte ports on top os ktor-io asynchronous API """.trimIndent() -val ktorVersion: String by rootProject.extra - dependencies { api(projects.controlsCore) - api("io.ktor:ktor-network:$ktorVersion") + api(spclibs.ktor.network) } readme{ diff --git a/controls-server/build.gradle.kts b/controls-server/build.gradle.kts index 43a9d61..5528b63 100644 --- a/controls-server/build.gradle.kts +++ b/controls-server/build.gradle.kts @@ -9,19 +9,16 @@ description = """ A combined Magix event loop server with web server for visualization. """.trimIndent() -val dataforgeVersion: String by rootProject.extra -val ktorVersion: String by rootProject.extra - dependencies { implementation(projects.controlsCore) implementation(projects.controlsPortsKtor) implementation(projects.magix.magixServer) - implementation("io.ktor:ktor-server-cio:$ktorVersion") - implementation("io.ktor:ktor-server-websockets:$ktorVersion") - implementation("io.ktor:ktor-server-content-negotiation:$ktorVersion") - implementation("io.ktor:ktor-serialization-kotlinx-json:$ktorVersion") - implementation("io.ktor:ktor-server-html-builder:$ktorVersion") - implementation("io.ktor:ktor-server-status-pages:$ktorVersion") + implementation(spclibs.ktor.server.cio) + implementation(spclibs.ktor.server.websockets) + implementation(spclibs.ktor.server.content.negotiation) + implementation(spclibs.ktor.serialization.kotlinx.json) + implementation(spclibs.ktor.server.html.builder) + implementation(spclibs.ktor.server.status.pages) } readme{ diff --git a/controls-storage/controls-xodus/build.gradle.kts b/controls-storage/controls-xodus/build.gradle.kts index 329f3ce..8cebd37 100644 --- a/controls-storage/controls-xodus/build.gradle.kts +++ b/controls-storage/controls-xodus/build.gradle.kts @@ -3,15 +3,13 @@ plugins { `maven-publish` } -val xodusVersion: String by rootProject.extra - description = """ An implementation of controls-storage on top of JetBrains Xodus. """.trimIndent() dependencies { api(projects.controlsStorage) - implementation("org.jetbrains.xodus:xodus-entity-store:$xodusVersion") + implementation(libs.xodus.entity.store) // implementation("org.jetbrains.xodus:xodus-environment:$xodusVersion") // implementation("org.jetbrains.xodus:xodus-vfs:$xodusVersion") diff --git a/demo/all-things/build.gradle.kts b/demo/all-things/build.gradle.kts index 05d7395..9670921 100644 --- a/demo/all-things/build.gradle.kts +++ b/demo/all-things/build.gradle.kts @@ -10,9 +10,6 @@ repositories { maven("https://repo.kotlin.link") } -val ktorVersion: String by rootProject.extra -val rsocketVersion: String by rootProject.extra - dependencies { implementation(projects.controlsCore) //implementation(projects.controlsServer) @@ -22,7 +19,7 @@ dependencies { implementation(projects.magix.magixZmq) implementation(projects.controlsOpcua) - implementation("io.ktor:ktor-client-cio:$ktorVersion") + implementation(spclibs.ktor.client.cio) implementation("no.tornado:tornadofx:1.7.20") implementation("space.kscience:plotlykt-server:0.5.3") // implementation("com.github.Ricky12Awesome:json-schema-serialization:0.6.6") diff --git a/demo/car/build.gradle.kts b/demo/car/build.gradle.kts index 5d53f11..0d2de58 100644 --- a/demo/car/build.gradle.kts +++ b/demo/car/build.gradle.kts @@ -10,9 +10,6 @@ repositories { maven("https://repo.kotlin.link") } -val ktorVersion: String by rootProject.extra -val rsocketVersion: String by rootProject.extra - dependencies { implementation(projects.controlsCore) implementation(projects.magix.magixApi) @@ -24,7 +21,7 @@ dependencies { implementation(projects.magix.magixStorage.magixStorageXodus) // implementation(projects.controlsMongo) - implementation("io.ktor:ktor-client-cio:$ktorVersion") + implementation(spclibs.ktor.client.cio) implementation("org.jetbrains.kotlinx:kotlinx-datetime:0.3.1") implementation("no.tornado:tornadofx:1.7.20") implementation("space.kscience:plotlykt-server:0.5.0") diff --git a/demo/echo/build.gradle.kts b/demo/echo/build.gradle.kts index 5563ba3..d10aee5 100644 --- a/demo/echo/build.gradle.kts +++ b/demo/echo/build.gradle.kts @@ -8,14 +8,11 @@ repositories { maven("https://repo.kotlin.link") } -val ktorVersion: String by rootProject.extra -val rsocketVersion: String by rootProject.extra - dependencies { implementation(projects.magix.magixServer) implementation(projects.magix.magixRsocket) implementation(projects.magix.magixZmq) - implementation("io.ktor:ktor-client-cio:$ktorVersion") + implementation(spclibs.ktor.client.cio) implementation("ch.qos.logback:logback-classic:1.2.11") } diff --git a/demo/many-devices/build.gradle.kts b/demo/many-devices/build.gradle.kts index 7248e42..250b5e7 100644 --- a/demo/many-devices/build.gradle.kts +++ b/demo/many-devices/build.gradle.kts @@ -9,16 +9,13 @@ repositories { maven("https://repo.kotlin.link") } -val ktorVersion: String by rootProject.extra -val rsocketVersion: String by rootProject.extra - dependencies { implementation(projects.magix.magixServer) implementation(projects.controlsMagix) implementation(projects.magix.magixRsocket) implementation(projects.magix.magixZmq) - implementation("io.ktor:ktor-client-cio:$ktorVersion") + implementation(spclibs.ktor.client.cio) implementation("space.kscience:plotlykt-server:0.6.0") implementation(spclibs.logback.classic) } diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml new file mode 100644 index 0000000..502a400 --- /dev/null +++ b/gradle/libs.versions.toml @@ -0,0 +1,17 @@ +[versions] + +dataforge = "0.6.2-dev-3" +rsocket = "0.15.4" +xodus = "2.0.1" + +uuid = "0.8.0" + +[libraries] + +dataforge-io = { module = "space.kscience:dataforge-io", version.ref = "dataforge" } +uuid = { module = "com.benasher44:uuid", version.ref = "uuid" } +xodus-entity-store = { module = "org.jetbrains.xodus:xodus-entity-store", version.ref = "xodus" } +rsocket-ktor-client = { module = "io.rsocket.kotlin:rsocket-ktor-client", version.ref = "rsocket" } +rsocket-ktor-server = { module = "io.rsocket.kotlin:rsocket-ktor-server", version.ref = "rsocket" } +rsocket-transport-ktor-tcp = { module = "io.rsocket.kotlin:rsocket-transport-ktor-tcp", version.ref = "rsocket" } + diff --git a/magix/magix-rsocket/build.gradle.kts b/magix/magix-rsocket/build.gradle.kts index b2046bb..ca016ce 100644 --- a/magix/magix-rsocket/build.gradle.kts +++ b/magix/magix-rsocket/build.gradle.kts @@ -10,7 +10,6 @@ description = """ """.trimIndent() val ktorVersion: String by rootProject.extra -val rsocketVersion: String by rootProject.extra kscience { jvm() @@ -21,11 +20,11 @@ kscience { } dependencies { api(projects.magix.magixApi) - implementation("io.ktor:ktor-client-core:$ktorVersion") - implementation("io.rsocket.kotlin:rsocket-ktor-client:$rsocketVersion") + implementation(spclibs.ktor.client.core) + implementation(libs.rsocket.ktor.client) } dependencies(jvmMain) { - implementation("io.rsocket.kotlin:rsocket-transport-ktor-tcp:$rsocketVersion") + implementation(libs.rsocket.transport.ktor.tcp) } } @@ -33,7 +32,7 @@ kotlin { sourceSets { getByName("linuxX64Main") { dependencies { - implementation("io.rsocket.kotlin:rsocket-transport-ktor-tcp:$rsocketVersion") + implementation(libs.rsocket.transport.ktor.tcp) } } } diff --git a/magix/magix-server/build.gradle.kts b/magix/magix-server/build.gradle.kts index cb63049..f00b81e 100644 --- a/magix/magix-server/build.gradle.kts +++ b/magix/magix-server/build.gradle.kts @@ -17,7 +17,6 @@ kscience { } val dataforgeVersion: String by rootProject.extra -val rsocketVersion: String by rootProject.extra val ktorVersion: String = space.kscience.gradle.KScienceVersions.ktorVersion dependencies{ @@ -28,8 +27,8 @@ dependencies{ api("io.ktor:ktor-serialization-kotlinx-json:$ktorVersion") api("io.ktor:ktor-server-html-builder:$ktorVersion") - api("io.rsocket.kotlin:rsocket-ktor-server:$rsocketVersion") - api("io.rsocket.kotlin:rsocket-transport-ktor-tcp:$rsocketVersion") + api(libs.rsocket.ktor.server) + api(libs.rsocket.transport.ktor.tcp) } readme{ diff --git a/magix/magix-storage/magix-storage-xodus/build.gradle.kts b/magix/magix-storage/magix-storage-xodus/build.gradle.kts index ed1dc32..f50abe3 100644 --- a/magix/magix-storage/magix-storage-xodus/build.gradle.kts +++ b/magix/magix-storage/magix-storage-xodus/build.gradle.kts @@ -3,15 +3,13 @@ plugins { `maven-publish` } -val xodusVersion: String by rootProject.extra - kscience { useCoroutines() } dependencies { api(projects.magix.magixStorage) - implementation("org.jetbrains.xodus:xodus-entity-store:$xodusVersion") + implementation(libs.xodus.entity.store) // implementation("org.jetbrains.xodus:dnq:2.0.0") testImplementation(spclibs.kotlinx.coroutines.test) diff --git a/settings.gradle.kts b/settings.gradle.kts index 20ac44e..626da41 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -35,6 +35,17 @@ dependencyResolutionManagement { versionCatalogs { create("spclibs") { from("space.kscience:version-catalog:$toolsVersion") + + library("ktor-client-core", "io.ktor", "ktor-client-core").versionRef("ktor") + library("ktor-client-cio", "io.ktor", "ktor-client-cio").versionRef("ktor") + library("ktor-network", "io.ktor", "ktor-network").versionRef("ktor") + library("ktor-serialization-kotlinx-json", "io.ktor", "ktor-serialization-kotlinx-json").versionRef("ktor") + + library("ktor-server-cio", "io.ktor", "ktor-server-cio").versionRef("ktor") + library("ktor-server-websockets", "io.ktor", "ktor-server-websockets").versionRef("ktor") + library("ktor-server-content-negotiation", "io.ktor", "ktor-server-content-negotiation").versionRef("ktor") + library("ktor-server-html-builder", "io.ktor", "ktor-server-html-builder").versionRef("ktor") + library("ktor-server-status-pages", "io.ktor", "ktor-server-status-pages").versionRef("ktor") } } }