import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar import org.jetbrains.kotlin.gradle.tasks.KotlinCompile plugins { kotlin("jvm") version "1.6.10" application id("nu.studer.rocker") version "3.0.4" id("com.github.johnrengelman.shadow") version "7.1.2" } group = "io.vertx" version = "4.1.5" repositories { mavenCentral() } dependencies { implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.0") implementation(platform("io.vertx:vertx-stack-depchain:$version")) implementation("io.vertx:vertx-core") implementation("com.fasterxml.jackson.module:jackson-module-blackbird:2.12.4") implementation("io.vertx:vertx-web") implementation("io.vertx:vertx-pg-client") implementation("io.vertx:vertx-web-templ-rocker") implementation("io.netty", "netty-transport-native-epoll", classifier = "linux-x86_64") implementation("io.vertx:vertx-lang-kotlin") implementation("io.vertx:vertx-lang-kotlin-coroutines") } rocker { configurations { create("main") { templateDir.set(file("src/main/resources")) optimize.set(true) javaVersion.set("1.8") } } } tasks.withType { kotlinOptions.jvmTarget = "11" } // content below copied from the project generated by the app generator val mainVerticleName = "io.vertx.benchmark.App" val launcherClassName = "io.vertx.core.Launcher" application { mainClass.set(launcherClassName) } tasks.withType { archiveClassifier.set("fat") manifest { attributes(mapOf("Main-Verticle" to mainVerticleName)) } mergeServiceFiles() } val watchForChange = "src/**/*" val doOnChange = "${projectDir}/gradlew classes" tasks.withType { args = listOf( "run", mainVerticleName, "--redeploy=$watchForChange", "--launcher-class=$launcherClassName", "--on-redeploy=$doOnChange" ) }