-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
109 lines (88 loc) · 2.8 KB
/
build.gradle
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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
plugins {
id 'java'
id 'application'
id "com.github.johnrengelman.shadow" version "7.0.0"
id "com.avast.gradle.docker-compose" version "0.14.9"
id 'com.google.cloud.tools.jib' version '3.1.4'
}
group 'br.ead.home.vertx'
version '1.0-SNAPSHOT'
sourceCompatibility = '17'
def mainVerticleName = "br.ead.home.vertx.Application"
def watchForChange = "src/**/*"
def doOnChange = "./gradlew classes"
def launcherClassName = "io.vertx.core.Launcher"
repositories {
mavenCentral()
}
dockerCompose.isRequiredBy(test)
dockerCompose {
projectName = project.name
projectNamePrefix = 'docker-compose'
stopContainers = true
removeContainers = true
removeOrphans = true
forceRecreate = true
}
application {
mainClass.set(launcherClassName)
}
jib {
from {
image = 'amazoncorretto:17-alpine-jdk'
}
to {
image = "br/ead/home/stock-broker"
}
container {
mainClass = "io.vertx.core.Launcher"
args = ["run", mainVerticleName]
ports = ["8888"]
}
}
configurations {
compileOnly {
extendsFrom annotationProcessor
}
}
dependencies {
implementation 'io.vertx:vertx-web:4.2.4'
implementation 'io.vertx:vertx-web-client:4.2.4'
implementation 'io.vertx:vertx-core:4.2.4'
implementation 'io.vertx:vertx-config:4.2.4'
implementation 'io.vertx:vertx-config-yaml:4.2.4'
implementation 'io.vertx:vertx-pg-client:4.2.4'
implementation 'io.vertx:vertx-sql-client-templates:4.2.4'
implementation 'com.ongres.scram:client:2.1'
implementation 'org.flywaydb:flyway-core:8.3.0'
implementation 'org.postgresql:postgresql:42.3.1'
implementation "org.slf4j:slf4j-api:1.7.31"
implementation "org.apache.logging.log4j:log4j-api:2.14.1"
implementation "org.apache.logging.log4j:log4j-core:2.14.1"
implementation "org.apache.logging.log4j:log4j-slf4j-impl:2.14.1"
implementation "com.google.guava:guava:30.1.1-jre"
compileOnly 'org.projectlombok:lombok:1.18.22'
annotationProcessor 'org.projectlombok:lombok:1.18.22'
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.7.0'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.7.0'
testImplementation 'io.vertx:vertx-junit5:4.2.3'
}
test {
useJUnitPlatform()
testLogging {
events "skipped", "failed"
}
}
tasks.withType ShadowJar, {
archiveClassifier.set("fat")
manifest {
attributes(Map.of("Main-Verticle", mainVerticleName))
}
mergeServiceFiles {
include("META-INF/br.ead.home.vertx.services/io.vertx.core.spi.VerticleFactory")
}
}
tasks.withType JavaExec, {
args = ["run", mainVerticleName, "--redeploy=$watchForChange", "--launcher-class=$launcherClassName", "--on-redeploy=$doOnChange"]
}