-
Notifications
You must be signed in to change notification settings - Fork 6
/
build.gradle
58 lines (44 loc) · 1.15 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
plugins {
id 'com.palantir.docker' version '0.20.1'
id 'org.cyclonedx.bom' version '1.4.1'
}
apply plugin: 'java'
apply plugin: 'war'
apply plugin: 'eclipse-wtp'
repositories {
mavenCentral()
}
sourceCompatibility = 1.8
war {
baseName = 'service'
}
repositories {
mavenCentral()
}
dependencies {
implementation 'org.glassfish.jersey.core:jersey-server:2.39'
implementation 'com.fasterxml.jackson.core:jackson-databind:2.13.4.2'
implementation 'com.google.guava:guava:24.1.1-jre'
implementation 'org.apache.httpcomponents:httpclient:4.5.14'
implementation 'org.slf4j:slf4j-api:1.6.4'
implementation 'ch.qos.logback:logback-classic:1.2.9'
implementation 'ch.qos.logback:logback-core:1.2.9'
}
task copyWar(type: Copy) {
from war
into "${projectDir}/../build"
}
tasks.build.doLast() {
copyWar.finalizedBy()
}
docker {
name "$SERVICE_REPO/$SERVICE_NAME:$SERVICE_TAG"
println "building image $name"
tags "$SERVICE_TAG"
dockerfile file("${projectDir}/Dockerfile")
copySpec.from("${projectDir}/build/libs/${war.baseName}.war").into(".")
pull true
noCache true
}
build.dependsOn(war)
docker.dependsOn(build)