cavecomm/build.gradle.kts
Tina_Azure 1c0bdd23e8 Project Setup:
Gradle + basic Helo World
2023-03-02 02:30:55 +01:00

64 lines
1.5 KiB
Plaintext

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<ShadowJar> {
archiveClassifier.set("fat")
manifest {
attributes(mapOf("Main-Verticle" to mainVerticleName))
}
mergeServiceFiles()
}
tasks.withType<Test> {
useJUnit()
testLogging {
events = setOf(PASSED, SKIPPED, FAILED)
}
}
tasks.withType<JavaExec> {
args = listOf("run", mainVerticleName, "--redeploy=$watchForChange", "--launcher-class=$launcherClassName", "--on-redeploy=$doOnChange")
}