import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar import org.jetbrains.kotlin.gradle.dsl.JvmTarget import org.jetbrains.kotlin.gradle.tasks.KotlinCompile tasks.wrapper { distributionType = Wrapper.DistributionType.ALL } plugins { kotlin("jvm") version "1.8.10" application id("nu.studer.rocker") version "3.0.4" id("com.github.johnrengelman.shadow") version "7.1.2" } group = "io.vertx" version = "4.3.8" repositories { mavenCentral() } dependencies { implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.4") implementation(platform("io.vertx:vertx-stack-depchain:$version")) implementation("io.vertx:vertx-core") implementation("com.fasterxml.jackson.module:jackson-module-blackbird:2.14.2") 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("17") } } } tasks.withType { compilerOptions.jvmTarget.set(JvmTarget.JVM_17) } // 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" ) }