import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar import org.gradle.api.tasks.testing.logging.TestLogEvent.* plugins { java application id("com.github.johnrengelman.shadow") version "7.1.2" } group = "com.cavecomm" version = "1.0.0-SNAPSHOT" repositories { mavenCentral() } val vertxVersion = "4.3.8" val junitJupiterVersion = "5.9.1" val mainVerticleName = "cavecomm.MainVerticle" val launcherClassName = "io.vertx.core.Launcher" val watchForChange = "src/**/*" val doOnChange = "${projectDir}/gradlew classes" application { mainClass.set(launcherClassName) } dependencies { implementation(platform("io.vertx:vertx-stack-depchain:$vertxVersion")) implementation("io.vertx:vertx-web") implementation("io.vertx:vertx-pg-client") implementation("io.vertx:vertx-web-sstore-cookie") implementation("io.vertx:vertx-auth-oauth2") implementation("com.ongres.scram:client:2.1") testImplementation("io.vertx:vertx-unit") testImplementation("junit:junit:4.13.2") } java { sourceCompatibility = JavaVersion.VERSION_17 targetCompatibility = JavaVersion.VERSION_17 } tasks.withType { archiveClassifier.set("fat") manifest { attributes(mapOf("Main-Verticle" to mainVerticleName)) } mergeServiceFiles() } tasks.withType { useJUnit() testLogging { events = setOf(PASSED, SKIPPED, FAILED) } } tasks.withType { args = listOf("run", mainVerticleName, "--redeploy=$watchForChange", "--launcher-class=$launcherClassName", "--on-redeploy=$doOnChange") }