-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
74 lines (63 loc) · 2.44 KB
/
build.gradle.kts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
plugins {
java
application
id("com.github.johnrengelman.shadow") version "4.0.3"
}
repositories {
mavenCentral()
}
val vertxVersion = "3.8.2"
val junitVersion = "5.3.2"
val micrometerVersion = "1.3.0"
val openTracingVersion = "0.33.0"
val elkAPMVersion = "1.10.0"
val slf4jVersion = "1.7.28"
val log4jVersion = "2.12.1"
val jacksonVersion = "2.9.8"
dependencies {
implementation("io.vertx:vertx-core:$vertxVersion")
implementation("io.vertx:vertx-web:$vertxVersion")
implementation("io.vertx:vertx-micrometer-metrics:$vertxVersion")
implementation("io.micrometer:micrometer-registry-prometheus:$micrometerVersion")
implementation("io.opentracing:opentracing-api:$openTracingVersion")
implementation("co.elastic.apm:apm-agent-attach:$elkAPMVersion")
implementation("co.elastic.apm:apm-opentracing:$elkAPMVersion")
implementation("org.slf4j:slf4j-api:$slf4jVersion")
implementation("org.apache.logging.log4j:log4j-slf4j18-impl:$log4jVersion")
implementation("org.apache.logging.log4j:log4j-core:$log4jVersion")
implementation("org.appenders.log4j:log4j2-elasticsearch-jest:1.3.5")
implementation("com.fasterxml.jackson.core:jackson-core:$jacksonVersion")
implementation("com.fasterxml.jackson.core:jackson-databind:$jacksonVersion")
implementation("com.fasterxml.jackson.core:jackson-annotations:$jacksonVersion")
testImplementation("io.vertx:vertx-junit5:$vertxVersion")
testImplementation("io.vertx:vertx-web-client:$vertxVersion")
testImplementation("org.junit.jupiter:junit-jupiter-api:$junitVersion")
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine:$junitVersion")
}
java {
sourceCompatibility = JavaVersion.VERSION_1_8
}
application {
mainClassName = "io.vertx.core.Launcher"
}
val mainVerticleName = "MainVerticle"
val watchForChange = "src/**/*.java"
val doOnChange = "${projectDir}/gradlew classes"
tasks {
test {
useJUnitPlatform()
}
getByName<JavaExec>("run") {
args = listOf("run", mainVerticleName, "--redeploy=${watchForChange}", "--launcher-class=${application.mainClassName}", "--on-redeploy=${doOnChange}")
}
withType<ShadowJar> {
classifier = "fat"
manifest {
attributes["Main-Verticle"] = mainVerticleName
}
mergeServiceFiles {
include("META-INF/services/io.vertx.core.spi.VerticleFactory")
}
}
}