-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
77 lines (60 loc) · 1.26 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
buildscript {
repositories {
mavenLocal()
mavenCentral()
jcenter()
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
}
}
allprojects {
group = 'hello.servicemesh'
version = '1.0.0'
buildDir = 'out'
}
subprojects {
apply plugin: 'java'
apply plugin: 'idea'
sourceCompatibility = 1.8
targetCompatibility = 1.8
repositories {
mavenLocal()
mavenCentral()
jcenter()
}
}
apply plugin: 'distribution'
def frontendDistDir = project(':frontend').file('out/distributions')
def File deployLibsDir= file('ops/dist/public/pkgs')
task deployLibs(type: Copy) {
from(project(':add.svc').libsDir) {
include '**/*.jar'
}
from(project(':sub.svc').libsDir) {
include '**/*.jar'
}
from(project(':api.gateway').libsDir) {
include '**/*.jar'
}
from(frontendDistDir) {
include '**/*.zip'
}
into(deployLibsDir)
}
clean.doLast {
file('ops/dist').deleteDir()
}
task buildAll() {
dependsOn 'sub.svc:build'
dependsOn 'add.svc:build'
dependsOn 'api.gateway:build'
dependsOn 'frontend:distZip'
}
task deploy() {
dependsOn 'clean'
dependsOn 'buildAll'
dependsOn 'deployLibs'
tasks.findByName('build').mustRunAfter 'clean'
tasks.findByName('deployLibs').mustRunAfter 'build'
}