From 18994d61ebab82a7e45cafa00c91cd8be1fb8f07 Mon Sep 17 00:00:00 2001 From: Oleg Yukhnevich Date: Sat, 3 Oct 2020 19:57:53 +0300 Subject: [PATCH] update ktor version extract versions to gradle.properties --- README.md | 28 +++++++++---------- benchmarks/build.gradle.kts | 11 +++++--- build.gradle.kts | 14 +++++++--- examples/multiplatform-chat/build.gradle.kts | 6 ++-- gradle.properties | 8 ++++++ playground/build.gradle.kts | 8 ++++-- rsocket-core/build.gradle.kts | 9 +++--- rsocket-test/build.gradle.kts | 8 ++++++ rsocket-transport-ktor/build.gradle.kts | 18 ++++++------ .../build.gradle.kts | 4 ++- .../build.gradle.kts | 6 ++-- settings.gradle.kts | 3 +- 12 files changed, 79 insertions(+), 44 deletions(-) diff --git a/README.md b/README.md index a174474b5..cccdddf43 100644 --- a/README.md +++ b/README.md @@ -63,15 +63,15 @@ dependencies { // one of ktor engines to work with websockets // client engines -// implementation 'io.ktor:ktor-client-js:1.4.0' //js -// implementation 'io.ktor:ktor-client-cio:1.4.0' //jvm -// implementation 'io.ktor:ktor-client-okhttp:1.4.0' //jvm +// implementation 'io.ktor:ktor-client-js:1.4.1' //js +// implementation 'io.ktor:ktor-client-cio:1.4.1' //jvm +// implementation 'io.ktor:ktor-client-okhttp:1.4.1' //jvm // server engines (jvm only) -// implementation 'io.ktor:ktor-server-cio:1.4.0' -// implementation 'io.ktor:ktor-server-netty:1.4.0' -// implementation 'io.ktor:ktor-server-jetty:1.4.0' -// implementation 'io.ktor:ktor-server-tomcat:1.4.0' +// implementation 'io.ktor:ktor-server-cio:1.4.1' +// implementation 'io.ktor:ktor-server-netty:1.4.1' +// implementation 'io.ktor:ktor-server-jetty:1.4.1' +// implementation 'io.ktor:ktor-server-tomcat:1.4.1' } ``` @@ -93,15 +93,15 @@ dependencies { // one of ktor engines to work with websockets // client engines -// implementation("io.ktor:ktor-client-js:1.4.0") //js -// implementation("io.ktor:ktor-client-cio:1.4.0") //jvm -// implementation("io.ktor:ktor-client-okhttp:1.4.0") //jvm +// implementation("io.ktor:ktor-client-js:1.4.1") //js +// implementation("io.ktor:ktor-client-cio:1.4.1") //jvm +// implementation("io.ktor:ktor-client-okhttp:1.4.1") //jvm // server engines (jvm only) -// implementation("io.ktor:ktor-server-cio:1.4.0") -// implementation("io.ktor:ktor-server-netty:1.4.0") -// implementation("io.ktor:ktor-server-jetty:1.4.0") -// implementation("io.ktor:ktor-server-tomcat:1.4.0") +// implementation("io.ktor:ktor-server-cio:1.4.1") +// implementation("io.ktor:ktor-server-netty:1.4.1") +// implementation("io.ktor:ktor-server-jetty:1.4.1") +// implementation("io.ktor:ktor-server-tomcat:1.4.1") } ``` diff --git a/benchmarks/build.gradle.kts b/benchmarks/build.gradle.kts index 9ca5fa0fd..29aad8372 100644 --- a/benchmarks/build.gradle.kts +++ b/benchmarks/build.gradle.kts @@ -26,6 +26,9 @@ repositories { maven("https://repo.spring.io/libs-snapshot") } +val rsocketJavaVersion: String by rootProject +val kotlinxCoroutinesVersion: String by rootProject + kotlin { val jvm = jvm() //common jvm source set val kotlinJvm = jvm("kotlin") //kotlin benchmark @@ -35,7 +38,7 @@ kotlin { val commonMain by getting { dependencies { implementation("org.jetbrains.kotlinx:kotlinx.benchmark.runtime:0.2.0-dev-20") - implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.9") + implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:$kotlinxCoroutinesVersion") } } @@ -52,9 +55,9 @@ kotlin { val javaMain by getting { dependsOn(jvmMain) dependencies { - implementation("org.jetbrains.kotlinx:kotlinx-coroutines-reactor:1.3.9") - implementation("io.rsocket:rsocket-core:1.1.0-M1") - implementation("io.rsocket:rsocket-transport-local:1.1.0-M1") + implementation("org.jetbrains.kotlinx:kotlinx-coroutines-reactor:$kotlinxCoroutinesVersion") + implementation("io.rsocket:rsocket-core:$rsocketJavaVersion") + implementation("io.rsocket:rsocket-transport-local:$rsocketJavaVersion") } } } diff --git a/build.gradle.kts b/build.gradle.kts index d501610ab..0cae59533 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -26,14 +26,20 @@ buildscript { repositories { mavenCentral() } + val kotlinVersion: String by rootProject + val kotlinxAtomicfuVersion: String by rootProject + dependencies { - classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.4.10") - classpath("org.jetbrains.kotlinx:atomicfu-gradle-plugin:0.14.4") + classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion") + classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion") + classpath("org.jetbrains.kotlinx:atomicfu-gradle-plugin:$kotlinxAtomicfuVersion") } } +val kotlinxAtomicfuVersion: String by rootProject + plugins { - id("com.github.ben-manes.versions") version "0.29.0" + id("com.github.ben-manes.versions") //needed to add classpath to script id("com.jfrog.bintray") apply false @@ -118,7 +124,7 @@ subprojects { if ("examples" in project.path || project.name == "playground") { val commonMain by sourceSets.getting { dependencies { - implementation("org.jetbrains.kotlinx:atomicfu:0.14.4") + implementation("org.jetbrains.kotlinx:atomicfu:$kotlinxAtomicfuVersion") } } } diff --git a/examples/multiplatform-chat/build.gradle.kts b/examples/multiplatform-chat/build.gradle.kts index 36f899fae..5302b7020 100644 --- a/examples/multiplatform-chat/build.gradle.kts +++ b/examples/multiplatform-chat/build.gradle.kts @@ -48,21 +48,21 @@ kotlin { val serverJvmMain by getting { dependencies { implementation(project(":rsocket-transport-ktor-server")) - implementation("io.ktor:ktor-server-cio:1.4.0") + implementation("io.ktor:ktor-server-cio:1.4.1") } } val clientJvmMain by getting { dependsOn(clientMain) dependencies { - implementation("io.ktor:ktor-client-cio:1.4.0") + implementation("io.ktor:ktor-client-cio:1.4.1") } } val clientJsMain by getting { dependsOn(clientMain) dependencies { - implementation("io.ktor:ktor-client-js:1.4.0") + implementation("io.ktor:ktor-client-js:1.4.1") } } } diff --git a/gradle.properties b/gradle.properties index 164463f63..7e7f286f1 100644 --- a/gradle.properties +++ b/gradle.properties @@ -18,6 +18,14 @@ group=io.rsocket.kotlin version=0.10.0 +#Versions +kotlinVersion=1.4.10 +ktorVersion=1.4.1 +kotlinxCoroutinesVersion=1.3.9 +kotlinxAtomicfuVersion=0.14.4 +turbineVersion=0.2.1 +rsocketJavaVersion=1.1.0-M2 + #Kotlin #kotlin.code.style=official kotlin.caching.enabled=true diff --git a/playground/build.gradle.kts b/playground/build.gradle.kts index ed9452e2b..a7a77425e 100644 --- a/playground/build.gradle.kts +++ b/playground/build.gradle.kts @@ -18,6 +18,8 @@ plugins { kotlin("multiplatform") } +val ktorVersion: String by rootProject + kotlin { jvm() js(IR) { @@ -38,13 +40,13 @@ kotlin { dependencies { implementation(project(":rsocket-transport-ktor-server")) - implementation("io.ktor:ktor-client-cio:1.4.0") - implementation("io.ktor:ktor-server-cio:1.4.0") + implementation("io.ktor:ktor-client-cio:$ktorVersion") + implementation("io.ktor:ktor-server-cio:$ktorVersion") } } val jsMain by getting { dependencies { - implementation("io.ktor:ktor-client-js:1.4.0") //for WS support + implementation("io.ktor:ktor-client-js:$ktorVersion") //for WS support } } } diff --git a/rsocket-core/build.gradle.kts b/rsocket-core/build.gradle.kts index 9190a1fac..20e40f294 100644 --- a/rsocket-core/build.gradle.kts +++ b/rsocket-core/build.gradle.kts @@ -23,6 +23,9 @@ plugins { id("com.jfrog.artifactory") } +val ktorVersion: String by rootProject +val kotlinxCoroutinesVersion: String by rootProject + kotlin { jvm() js() @@ -30,14 +33,12 @@ kotlin { sourceSets { val commonMain by getting { dependencies { - api("io.ktor:ktor-io:1.4.0") - api("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.9") + api("io.ktor:ktor-io:$ktorVersion") + api("org.jetbrains.kotlinx:kotlinx-coroutines-core:$kotlinxCoroutinesVersion") } } val commonTest by getting { dependencies { - implementation("app.cash.turbine:turbine:0.2.1") - implementation("io.ktor:ktor-utils:1.4.0") implementation(project(":rsocket-transport-local")) } } diff --git a/rsocket-test/build.gradle.kts b/rsocket-test/build.gradle.kts index 794a4e095..8ec5e75c9 100644 --- a/rsocket-test/build.gradle.kts +++ b/rsocket-test/build.gradle.kts @@ -18,6 +18,10 @@ plugins { kotlin("multiplatform") } +val ktorVersion: String by rootProject +val kotlinxCoroutinesVersion: String by rootProject +val turbineVersion: String by rootProject + kotlin { jvm() js() @@ -28,6 +32,10 @@ kotlin { api(project(":rsocket-core")) api(kotlin("test-common")) api(kotlin("test-annotations-common")) + + api("org.jetbrains.kotlinx:kotlinx-coroutines-core:$kotlinxCoroutinesVersion") + api("io.ktor:ktor-utils:$ktorVersion") + api("app.cash.turbine:turbine:$turbineVersion") } } val jvmMain by getting { diff --git a/rsocket-transport-ktor/build.gradle.kts b/rsocket-transport-ktor/build.gradle.kts index 1d9e3a358..79bd49db9 100644 --- a/rsocket-transport-ktor/build.gradle.kts +++ b/rsocket-transport-ktor/build.gradle.kts @@ -22,6 +22,8 @@ plugins { id("com.jfrog.artifactory") } +val ktorVersion: String by rootProject + kotlin { jvm() js() @@ -29,8 +31,8 @@ kotlin { sourceSets { val commonMain by getting { dependencies { - api("io.ktor:ktor-network:1.4.0") - api("io.ktor:ktor-http-cio:1.4.0") + api("io.ktor:ktor-network:$ktorVersion") + api("io.ktor:ktor-http-cio:$ktorVersion") api(project(":rsocket-core")) } } @@ -41,13 +43,13 @@ kotlin { } val jvmTest by getting { dependencies { - implementation("io.ktor:ktor-client-cio:1.4.0") - implementation("io.ktor:ktor-client-okhttp:1.4.0") + implementation("io.ktor:ktor-client-cio:$ktorVersion") + implementation("io.ktor:ktor-client-okhttp:$ktorVersion") - implementation("io.ktor:ktor-server-cio:1.4.0") - implementation("io.ktor:ktor-server-netty:1.4.0") - implementation("io.ktor:ktor-server-jetty:1.4.0") - implementation("io.ktor:ktor-server-tomcat:1.4.0") + implementation("io.ktor:ktor-server-cio:$ktorVersion") + implementation("io.ktor:ktor-server-netty:$ktorVersion") + implementation("io.ktor:ktor-server-jetty:$ktorVersion") + implementation("io.ktor:ktor-server-tomcat:$ktorVersion") implementation(project(":rsocket-transport-ktor-server")) } diff --git a/rsocket-transport-ktor/rsocket-transport-ktor-client/build.gradle.kts b/rsocket-transport-ktor/rsocket-transport-ktor-client/build.gradle.kts index b525d5f31..45c95da39 100644 --- a/rsocket-transport-ktor/rsocket-transport-ktor-client/build.gradle.kts +++ b/rsocket-transport-ktor/rsocket-transport-ktor-client/build.gradle.kts @@ -22,6 +22,8 @@ plugins { id("com.jfrog.artifactory") } +val ktorVersion: String by rootProject + kotlin { jvm() js() @@ -32,7 +34,7 @@ kotlin { api(project(":rsocket-core")) api(project(":rsocket-transport-ktor")) - api("io.ktor:ktor-client-core:1.4.0") + api("io.ktor:ktor-client-core:$ktorVersion") } } } diff --git a/rsocket-transport-ktor/rsocket-transport-ktor-server/build.gradle.kts b/rsocket-transport-ktor/rsocket-transport-ktor-server/build.gradle.kts index 108c2c1c9..52bb42d4e 100644 --- a/rsocket-transport-ktor/rsocket-transport-ktor-server/build.gradle.kts +++ b/rsocket-transport-ktor/rsocket-transport-ktor-server/build.gradle.kts @@ -22,6 +22,8 @@ plugins { id("com.jfrog.artifactory") } +val ktorVersion: String by rootProject + kotlin { jvm() @@ -31,8 +33,8 @@ kotlin { api(project(":rsocket-core")) api(project(":rsocket-transport-ktor")) - api("io.ktor:ktor-server:1.4.0") - api("io.ktor:ktor-websockets:1.4.0") + api("io.ktor:ktor-server:$ktorVersion") + api("io.ktor:ktor-websockets:$ktorVersion") } } } diff --git a/settings.gradle.kts b/settings.gradle.kts index 288e3b530..404fbb82b 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -23,7 +23,8 @@ pluginManagement { plugins { id("com.jfrog.bintray") version "1.8.5" - id("com.jfrog.artifactory") version "4.17.0" + id("com.jfrog.artifactory") version "4.17.2" + id("com.github.ben-manes.versions") version "0.33.0" } }