/
build.gradle
49 lines (40 loc) · 1.1 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
ext {
artifactName = 'cloud-gateway-package'
pullNo = project.hasProperty("pullRequest") && project.getProperty("pullRequest") != null ? "-" + project.getProperty("pullRequest") : ""
}
configurations {
cloudGatewayServiceJar
zip
}
dependencies {
cloudGatewayServiceJar(project(path: ":cloud-gateway-service", configuration: "bootArchives"))
}
task packageCloudGateway(type: Zip) {
archiveFileName = artifactName + pullNo + ".zip"
includeEmptyDirs = true
def resourceDir = 'src/main/resources/'
into('/') {
from "$resourceDir/manifest.yaml"
from "../schemas/cloud-gateway-schema.json"
}
into('bin/') {
from configurations.cloudGatewayServiceJar
from "$resourceDir/bin/start.sh"
from "$resourceDir/bin/validate.sh"
}
}
jar.dependsOn(packageCloudGateway)
build.dependsOn(packageCloudGateway)
artifacts {
zip packageCloudGateway
}
publishing {
publications {
mavenJava(MavenPublication) {
artifact("$buildDir/distributions/$artifactName" + pullNo + ".zip")
}
}
}
jar {
enabled false
}