Skip to content

Commit

Permalink
dependency: upgrade kotlin to 1.7.10, coroutines to 1.6.4, vertx to 4…
Browse files Browse the repository at this point in the history
….3.2, grpc to 1.47.0 and others.
  • Loading branch information
xiaodongw committed Jul 16, 2022
1 parent 301e4ef commit 92653da
Show file tree
Hide file tree
Showing 9 changed files with 47 additions and 37 deletions.
8 changes: 4 additions & 4 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ plugins {
kotlin("jvm") apply false // Enables Kotlin Gradle plugin
signing
`maven-publish`
id("com.github.ben-manes.versions").version("0.39.0")
id("com.adarshr.test-logger").version("3.0.0")
id("io.kotest") version "0.3.9"
alias(libs.plugins.versions)
alias(libs.plugins.test.logger)
alias(libs.plugins.kotest)
}

allprojects {
Expand Down Expand Up @@ -77,7 +77,7 @@ allprojects {
withType<KotlinCompile> {
kotlinOptions {
jvmTarget = "1.8"
freeCompilerArgs = listOf("-opt-in=kotlin.RequiresOptIn")
freeCompilerArgs = listOf("-opt-in=kotlin.RequiresOptIn", /*"-Xuse-k2"*/)
}
}

Expand Down
4 changes: 2 additions & 2 deletions buildSrc/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ repositories {
}

dependencies {
implementation("org.jetbrains.kotlin:kotlin-gradle-plugin:1.6.10")
implementation("org.jetbrains.kotlin:kotlin-gradle-plugin:1.7.10")
implementation("com.google.gradle:osdetector-gradle-plugin:1.6.2")
implementation("com.google.protobuf:protobuf-gradle-plugin:0.8.13")
implementation("org.jetbrains.dokka:dokka-gradle-plugin:1.6.10")
implementation("org.jetbrains.dokka:dokka-gradle-plugin:1.7.10")
}
20 changes: 12 additions & 8 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
# https://docs.gradle.org/current/userguide/platforms.html#sub:conventional-dependencies-toml

[versions]
kotlin = "1.6.10"
kotlinx-coroutines = "1.6.0"
vertx = "4.2.4"
protobuf = "3.19.4"
grpc = "1.44.0"
kotest = "5.1.0"
jackson = "2.13.1"
kotlin = "1.7.10"
kotlinx-coroutines = "1.6.4"
vertx = "4.3.2"
protobuf = "3.21.2"
grpc = "1.47.0"
kotest = "5.3.2"
jackson = "2.13.3"
graphql-kotlin = "5.3.2"
kotlin-logging = "2.1.21"
kotlin-logging = "2.1.23"
logback = "1.2.3"
slf4j = "1.7.30"

Expand Down Expand Up @@ -56,3 +56,7 @@ kotest = [
]

[plugins]
versions = { id = "com.github.ben-manes.versions", version = "0.42.0" }
test-logger = { id = "com.adarshr.test-logger", version = "3.0.0" } # latest version 3.2.0 not working well with kotest, the output is duplicated
kotest = { id = "io.kotest", version = "0.3.9" }
graphql = { id = "com.expediagroup.graphql", version.ref = "graphql-kotlin" }
2 changes: 1 addition & 1 deletion kert-graphql/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import build.*

plugins {
id("com.expediagroup.graphql") version "5.3.2"
alias(libs.plugins.graphql)
}

description = "Kert GraphQL support"
Expand Down
17 changes: 11 additions & 6 deletions kert-grpc/src/test/kotlin/ws/leap/kert/grpc/GrpcSpec.kt
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,16 @@ abstract class GrpcSpec : FunSpec() {
}
protected abstract fun configureServer(builder: GrpcServerBuilder)

override fun beforeSpec(spec: Spec) = runBlocking<Unit> {
server.start()
}

override fun afterSpec(spec: Spec) = runBlocking {
server.stop()
init {
beforeSpec {
runBlocking {
server.start()
}
}
afterSpec {
runBlocking {
server.stop()
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ internal class HttpClientImpl (private val underlying: io.vertx.core.http.impl.H
return HttpClientImpl(underlying, filters, options)
}

override val protocolVersion: HttpVersion = underlying.options.protocolVersion
override val protocolVersion: HttpVersion = underlying.options().protocolVersion

private suspend fun callHttp(request: HttpClientRequest): HttpClientResponse {
val responseDeferred = CompletableDeferred<HttpClientResponse>()
Expand Down
15 changes: 8 additions & 7 deletions kert-http/src/test/kotlin/ws/leap/kert/http/ClientServerSpec.kt
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,13 @@ abstract class ClientServerSpec : FunSpec() {
// TODO enable this when all problems fixed
override fun testCaseOrder() = TestCaseOrder.Random

override fun beforeSpec(spec: Spec) {
server.start()
}

override fun afterSpec(spec: Spec) {
server.stop()
vertx.close()
init {
beforeSpec {
server.start()
}
afterSpec {
server.stop()
vertx.close()
}
}
}
14 changes: 7 additions & 7 deletions kert-http/src/test/kotlin/ws/leap/kert/http/HttpFilterSpec.kt
Original file line number Diff line number Diff line change
Expand Up @@ -78,15 +78,15 @@ class HttpFilterSpec : FunSpec() {
}
}

override fun beforeSpec(spec: Spec) = runBlocking {
server.start()
}
init {
beforeSpec {
server.start()
}

override fun afterSpec(spec: Spec) = runBlocking {
server.stop()
}
afterSpec {
server.stop()
}

init {
context("filter on sub router") {
test("/sub/ping works with authentication header") {
val resp = client.get("/sub/ping")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ fun createKertServer(vertx: Vertx, port: Int): TestServer {
}
}

fun main(args: Array<String>) = runBlocking {
fun main() = runBlocking {
val server = createHttpServer(Vertx.vertx(), 8000)
server.start()
}

0 comments on commit 92653da

Please sign in to comment.