-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
107 lines (92 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
plugins {
id 'org.springframework.boot' version '2.7.4'
id 'io.spring.dependency-management' version '1.0.14.RELEASE'
id 'java'
id "org.asciidoctor.jvm.convert" version "3.3.2"
}
group = 'shop.kokodo'
version = '0.0.1-SNAPSHOT'
sourceCompatibility = '11'
ext {
set('springCloudVersion', "2021.0.4")
snippetsDir = file('build/generated-snippets')
}
configurations {
compileOnly {
extendsFrom annotationProcessor
}
}
repositories {
mavenCentral()
}
dependencies {
implementation 'org.springframework.boot:spring-boot-starter-batch'
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'org.springframework.cloud:spring-cloud-starter-netflix-eureka-client'
implementation 'org.springframework.cloud:spring-cloud-starter-openfeign'
implementation group: 'org.modelmapper', name: 'modelmapper', version: '2.1.1'
implementation 'mysql:mysql-connector-java:8.0.28'
implementation 'org.springframework.kafka:spring-kafka'
compileOnly 'org.projectlombok:lombok'
annotationProcessor 'org.projectlombok:lombok'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
testImplementation 'org.springframework.batch:spring-batch-test'
testImplementation group: 'org.springframework.restdocs', name: 'spring-restdocs-mockmvc', version: '2.0.4.RELEASE'
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.9.0'
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.9.0'
testCompileOnly 'org.projectlombok:lombok' // 테스트 의존성 추가
testAnnotationProcessor 'org.projectlombok:lombok' // 테스트 의존성 추가
testImplementation 'org.springframework.restdocs:spring-restdocs-mockmvc'
implementation group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: '2.12.1'
// h2
implementation 'com.h2database:h2:2.1.214'
//spring boot actuator - cloud config를 서버다운 안시키고 적용시키는 방법
implementation 'org.springframework.boot:spring-boot-starter-actuator'
// resilence4j- circuit breaker
implementation 'org.springframework.cloud:spring-cloud-starter-circuitbreaker-reactor-resilience4j'
//zipkin
// implementation 'org.springframework.cloud:spring-cloud-starter-sleuth'
// implementation 'org.springframework.cloud:spring-cloud-starter-zipkin:2.2.3.RELEASE'
}
//spring cloud
dependencyManagement {
imports {
mavenBom "org.springframework.cloud:spring-cloud-dependencies:${springCloudVersion}"
}
}
tasks.named('test') {
outputs.dir snippetsDir
useJUnitPlatform()
}
//==================Spring Rest docs==================
test {
outputs.dir snippetsDir
}
asciidoctor {
dependsOn test
inputs.dir snippetsDir
// configurations 'asciidoctorExt'
}
task createDocument(type: Copy) {
dependsOn asciidoctor
asciidoctor
from file("build/docs/asciidoc")
into file("src/main/resources/static/docs")
}
//==================Spring Rest docs==================
build {
dependsOn createDocument
}
bootJar {
dependsOn createDocument
from("${asciidoctor.outputDir}/html5") {
into 'static'
}
}
configurations {
//==================Spring Rest docs==================
compileOnly {
extendsFrom annotationProcessor
}
}