-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathbuild.gradle
108 lines (87 loc) · 3.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
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
106
107
108
import java.time.LocalDateTime
import java.time.format.DateTimeFormatter
plugins {
id 'java'
id 'idea'
id 'eclipse'
id 'application'
id 'org.springframework.boot' version '2.2.6.RELEASE'
id 'io.spring.dependency-management' version '1.0.9.RELEASE'
}
group = 'com.github.eltonsandre.sample'
version = '0.0.1-SNAPSHOT'
mainClassName = "${group}.circuitbreak.CircuitbreakApplication"
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
compileJava.options.encoding = 'UTF-8'
compileTestJava.options.encoding = 'UTF-8'
configurations {
developmentOnly
runtimeClasspath {
extendsFrom developmentOnly
}
compileOnly {
extendsFrom annotationProcessor
}
}
configurations.all {
resolutionStrategy.cacheChangingModulesFor 0, 'seconds'
}
repositories {
mavenLocal()
mavenCentral()
}
ext {
set('springCloudVersion', "Hoxton.SR3")
set('resilience4jVersion', "1.3.1")
set('resilience4j.version', resilience4jVersion)
}
dependencies {
implementation 'com.github.eltonsandre.utils:mask-utils:1.0.1',
'org.springdoc:springdoc-openapi-ui:1.2.32',
'org.springframework.boot:spring-boot-starter-web',
'org.springframework.boot:spring-boot-starter-aop',
'org.springframework.boot:spring-boot-starter-actuator',
'org.springframework.boot:spring-boot-starter-validation',
'org.springframework.cloud:spring-cloud-starter-openfeign',
'org.springframework.cloud:spring-cloud-starter-circuitbreaker-resilience4j',
"io.github.resilience4j:resilience4j-spring-boot2:${resilience4jVersion}",
"io.github.resilience4j:resilience4j-feign:${resilience4jVersion}"
annotationProcessor 'org.springframework.boot:spring-boot-configuration-processor',
'org.projectlombok:lombok',
'org.springframework.boot:spring-boot-configuration-processor'
compileOnly 'org.projectlombok:lombok'
developmentOnly 'org.springframework.boot:spring-boot-devtools'
testImplementation('org.springframework.boot:spring-boot-starter-test') {
exclude group: 'org.junit.vintage', module: 'junit-vintage-engine'
}
}
dependencyManagement {
imports {
mavenBom "org.springframework.cloud:spring-cloud-dependencies:${springCloudVersion}"
}
}
test {
useJUnitPlatform()
}
springBoot {
buildInfo {
properties {
additional = [
'spring.cloud.version': springCloudVersion,
]
}
}
}
bootJar {
manifest {
attributes(
'Implementation-Title': rootProject.name,
'Implementation-Version': rootProject.version,
'Build-Timestamp': LocalDateTime.now().format(DateTimeFormatter.ISO_DATE_TIME),
'Build-Jdk': "${System.properties['java.version']} (${System.properties['java.vendor']} ${System.properties['java.vm.version']})",
'Build-OS': "${System.properties['os.name']} ${System.properties['os.arch']} ${System.properties['os.version']}",
'Created-By': "Gradle ${gradle.gradleVersion}",
)
}
}