61 lines
1.4 KiB
Kotlin
61 lines
1.4 KiB
Kotlin
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
|
|
import org.gradle.api.tasks.testing.logging.TestLogEvent.*
|
|
|
|
plugins {
|
|
java
|
|
application
|
|
id("com.gradleup.shadow") version "9.2.2"
|
|
}
|
|
|
|
group = "com.example"
|
|
version = "1.0.0-SNAPSHOT"
|
|
|
|
repositories {
|
|
mavenCentral()
|
|
}
|
|
|
|
val vertxVersion = "5.0.10"
|
|
|
|
val mainVerticleName = "com.example.starter.MainVerticle"
|
|
val launcherClassName = "io.vertx.launcher.application.VertxApplication"
|
|
|
|
application {
|
|
mainClass.set(launcherClassName)
|
|
}
|
|
|
|
dependencies {
|
|
implementation(platform("io.vertx:vertx-stack-depchain:$vertxVersion"))
|
|
implementation("io.vertx:vertx-launcher-application")
|
|
implementation("io.vertx:vertx-web-client")
|
|
implementation("io.vertx:vertx-config")
|
|
implementation("io.vertx:vertx-sql-client-templates")
|
|
implementation("io.vertx:vertx-health-check")
|
|
implementation("io.vertx:vertx-web")
|
|
implementation("io.vertx:vertx-mysql-client")
|
|
implementation("io.vertx:vertx-mail-client")
|
|
}
|
|
|
|
java {
|
|
sourceCompatibility = JavaVersion.VERSION_21
|
|
targetCompatibility = JavaVersion.VERSION_21
|
|
}
|
|
|
|
tasks.withType<ShadowJar> {
|
|
archiveClassifier.set("fat")
|
|
manifest {
|
|
attributes(mapOf("Main-Verticle" to mainVerticleName))
|
|
}
|
|
mergeServiceFiles()
|
|
}
|
|
|
|
tasks.withType<Test> {
|
|
useJUnitPlatform()
|
|
testLogging {
|
|
events = setOf(PASSED, SKIPPED, FAILED)
|
|
}
|
|
}
|
|
|
|
tasks.withType<JavaExec> {
|
|
args = listOf(mainVerticleName)
|
|
}
|