-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
97 lines (84 loc) · 2.34 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
/**
* @author Aaron R Miller<aaron.miller@waweb.io>
*/
import com.github.jengelman.gradle.plugins.shadow.tasks.ShadowJar
plugins {
id 'java'
id 'application'
id 'com.github.johnrengelman.shadow' version '6.0.0'
id 'com.palantir.docker' version '0.25.0'
//id 'com.palantir.docker-run' version '0.25.0'
}
ext {
mainVerticleName = "watheia.vertx.mesh.website.MainVerticle"
}
repositories {
jcenter()
mavenCentral()
maven { url = "https://maven.gentics.com/maven2" }
}
dependencies {
// Use the latest Groovy version for building this library
implementation "io.vertx:vertx-core:${VERTX_VER}",
"io.vertx:vertx-config:${VERTX_VER}",
"io.vertx:vertx-rx-java2-gen:${VERTX_VER}",
"io.vertx:vertx-rx-java2:${VERTX_VER}",
"io.vertx:vertx-mail-service:${VERTX_VER}",
"io.vertx:vertx-web:${VERTX_VER}",
"io.vertx:vertx-web-templ-handlebars:${VERTX_VER}",
"com.gentics.mesh:mesh-rest-client:${MESH_VER}",
"org.subethamail:subethasmtp:${SUBETHASMTP_VER}"
testImplementation "io.vertx:vertx-junit5:${VERTX_VER}",
"io.vertx:vertx-web-client:${VERTX_VER}",
"org.junit.jupiter:junit-jupiter-api:${JUNIT_VER}",
"org.junit.jupiter:junit-jupiter-engine:${JUNIT_VER}",
"org.hamcrest:hamcrest:${HAMCREST_VER}"
}
docker {
name "registry.digitalocean.com/watheia/vertx-mesh-website:v${project.version}"
dockerfile file('src/k8s/Dockerfile')
files zipTree("build/distributions/${project.name}-shadow-${project.version}.zip"),
'src/k8s/gu-wrapper.sh',
'conf/test.keystore',
'conf/wa.http1.properties',
'conf/wa.http2.properties',
'conf/wa.services.json'
labels(['env': 'production'])
buildArgs(['BUILD_VERSION': project.version])
pull true
dependsOn shadowDistZip
}
java {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}
application {
mainClassName = "io.vertx.core.Launcher"
}
test {
useJUnitPlatform()
}
run {
args = [
"run",
"${mainVerticleName}",
"--redeploy=src/main/**",
"--on-redeploy=${rootProject.projectDir}/gradlew classes",
"--launcher-class=${application.mainClassName}"
]
}
tasks.withType(ShadowJar) {
classifier = "fat"
manifest {
attributes["Main-Verticle"] = mainVerticleName
}
mergeServiceFiles {
include("META-INF/services/io.vertx.core.spi.VerticleFactory")
}
}
build {
dependsOn tasks.docker
}
task deploy {
dependsOn build, dockerTag, dockerPush
}