forked from docker-production-aws/microtrader
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
105 lines (92 loc) · 2.5 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
plugins({
id('application')
id 'java'
id('com.github.johnrengelman.shadow').version('4.0.1')
})
allprojects(
{
apply(plugin: 'application')
apply(plugin: 'java')
apply(plugin: 'com.github.johnrengelman.shadow')
repositories({
mavenCentral()
})
ext({
vertxVersion = '3.7.0'
commitTimestamp = {
return "git log -1 --pretty=format:%cd --date=format:%Y%m%d%H%M%S".execute().text.trim()
}
commitId = {
return "git rev-parse --short HEAD".execute().text.trim()
}
buildId = {
if (System.getenv("BUILD_ID") != null) return ".${System.getenv("BUILD_ID")}"
else return ""
}
})
group = 'com.pluralsight.docker-production-aws'
version = System.getenv("APP_VERSION") ?: "${commitTimestamp()}.${commitId()}${buildId()}"
sourceCompatibility = '1.8'
mainClassName = 'io.vertx.core.Launcher'
dependencies({
compile("io.vertx:vertx-core:$vertxVersion")
compile("io.vertx:vertx-hazelcast:$vertxVersion")
compile("io.vertx:vertx-service-discovery:$vertxVersion")
compile("io.vertx:vertx-dropwizard-metrics:$vertxVersion")
compile("com.typesafe:config:1.3.0")
compile("com.hazelcast:hazelcast-cloud:3.6.5")
testCompile("io.vertx:vertx-unit:$vertxVersion")
testCompile("junit:junit:4.12")
testCompile("org.assertj:assertj-core:3.5.2")
testCompile("com.jayway.awaitility:awaitility:1.7.0")
})
task copyDeps(type: Copy) {
from (configurations.runtime + configurations.testRuntime) exclude '*'
into '/tmp'
}
test(
{
testLogging(
{
events("passed", "skipped", "failed")
}
)
reports(
{
junitXml.enabled = true
junitXml.destination = file("${rootProject.projectDir}/build/test-results/junit")
html.enabled = false
}
)
}
)
}
)
task testReport(type: TestReport) {
destinationDir = file("${rootProject.projectDir}/build/test-results/html")
reportOn subprojects*.test
}
test(
{
dependsOn(testReport)
}
)
configure(
(subprojects - project(':microtrader-common')),
{
shadowJar(
{
destinationDir = file("${rootProject.projectDir}/build/jars")
classifier = 'fat'
mergeServiceFiles(
{
include('META-INF/services/io.vertx.core.spi.VerticleFactory')
}
)
}
)
}
)
task wrapper(type: Wrapper) {
gradleVersion = '4.10.2'
}