-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
102 lines (87 loc) · 2.42 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
//plugins
plugins {
id 'org.springframework.boot' version '2.2.5.RELEASE'
id 'io.spring.dependency-management' version '1.0.9.RELEASE'
id 'java'
id 'com.google.cloud.tools.jib' version '2.1.0' apply false
}
subprojects {
//project information
group = 'com.sphong'
version = '0.0.1-SNAPSHOT'
//java version
sourceCompatibility = '1.8'
apply plugin : 'java'
apply plugin : 'org.springframework.boot'
apply plugin : 'io.spring.dependency-management'
apply plugin : 'com.google.cloud.tools.jib'
configurations {
compileOnly {
extendsFrom annotationProcessor
}
}
//repository looking for dependencies
repositories {
mavenCentral()
//jcenter()
}
//global variable
ext {
set('springCloudVersion', "Hoxton.SR1")
set('gcr',"asia.gcr.io")
set('projectName',"sphong-kuber")
}
//Add dependencies
dependencies {
implementation 'org.springframework.boot:spring-boot-actuator'
implementation 'org.springframework.boot:spring-boot-starter-webflux'
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'org.springframework.cloud:spring-cloud-starter-netflix-ribbon'
compileOnly 'org.projectlombok:lombok'
annotationProcessor 'org.projectlombok:lombok'
testImplementation('org.springframework.boot:spring-boot-starter-test') {
exclude group: 'org.junit.vintage', module: 'junit-vintage-engine'
}
}
//Setting for dependency management
dependencyManagement {
imports {
mavenBom "org.springframework.cloud:spring-cloud-dependencies:${springCloudVersion}"
}
}
test {
useJUnitPlatform()
}
//build docker image
jib {
to {
image = "${gcr}/${projectName}/" + "${bootJar.baseName}:${bootJar.version}"
}
}
}
project(':sample-api') {
dependencies {
compile project(':sample-common')
}
//Customizing bootJar
bootJar {
baseName = "${project.name}"
version = '0.1.0'
}
}
project(':sample-admin') {
//Customizing bootJar
bootJar {
baseName = "${project.name}"
version = '0.1.0'
}
dependencies {
compile project(':sample-common')
}
}
project(':sample-common') {
bootJar {
baseName = "${project.name}"
version = '0.1.0'
}
}