Getting started with Vert.x
Vert.x is a Reactive framework that is asynchronous and non-blocking. Let’s understand what this means by looking at a concrete example.
We’ll start by creating a new Kotlin Gradle project. You can follow the steps from the previous chapter for that. Alternatively, you can also generate a new project by using start.vertx.io.
Next, add the following dependencies to your build.gradle.kts
file:
val vertxVersion = "4.5.6"
dependencies {
implementation(platform("io.vertx:vertx-stack-depchain:$vertxVersion"))
implementation("io.vertx:vertx-web")
implementation("io.vertx:vertx-lang-kotlin")
implementation("io.vertx:vertx-lang-kotlin-coroutines")
}
Similar to what we discussed in the previous chapter, all the dependencies must be of the same version to avoid any conflicts. That’s the reason why we are using a variable for the library version—to be able...