-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
93 lines (77 loc) · 2.28 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
buildscript {
repositories {
// buildscript의 의존성을 위한 저장소
mavenCentral()
}
}
plugins {
id 'java'
id 'org.springframework.boot' version '3.2.3'
id 'io.spring.dependency-management' version '1.1.4'
id 'com.epages.restdocs-api-spec' version '0.19.1'
}
allprojects {
// Java 버전 설정
sourceCompatibility = "17"
targetCompatibility = "17"
repositories {
// 필요한 라이브러리들을 받아올 원격 저장소
mavenCentral()
}
}
subprojects {
apply plugin: "java"
apply plugin: "org.springframework.boot"
apply plugin: "io.spring.dependency-management"
group = "com.backtothefuture"
// 설정
configurations {
compileOnly {
extendsFrom annotationProcessor
}
asciidoctorExt
}
ext {
testcontainersVersion = "1.19.2"
}
// 의존성 관리
dependencies {
implementation "org.springframework.boot:spring-boot-starter-data-jpa"
implementation "org.springframework.boot:spring-boot-starter-web"
// lombok
implementation "org.projectlombok:lombok"
annotationProcessor "org.projectlombok:lombok"
testAnnotationProcessor "org.projectlombok:lombok"
testImplementation 'io.rest-assured:rest-assured'
testImplementation "org.springframework.boot:spring-boot-starter-test"
testImplementation 'org.springframework.security:spring-security-test'
testImplementation 'org.springframework.restdocs:spring-restdocs-mockmvc'
testImplementation 'com.epages:restdocs-api-spec-mockmvc:0.19.1'
testImplementation "org.testcontainers:junit-jupiter:${testcontainersVersion}"
}
// 테스트 설정
test {
useJUnitPlatform()
}
// clean 설정
clean {
delete file('src/main/generated') // annotation processor 생성물 생성위치
}
}
/**
* 각 api의 openapi3 스크립트 호출 :: 결과물을 /docs/openapi 로 복사한다.
*/
task copyOpenApiSpecsToDocsDir(type: Copy) {
dependsOn ':api:member:openapi3'
dependsOn ':api:store:makeOpenapi'
dependsOn ':api:event:openapi3'
// member
from "${project(':api:member').buildDir}/api-spec/member-openapi.yaml"
into "${project.rootDir}/docs/openapi"
// product
from "${project(':api:store').buildDir}/api-spec/store-openapi.yaml"
into "${project.rootDir}/docs/openapi"
//event
from "${project(':api:event').buildDir}/api-spec/event-openapi.yaml"
into "${project.rootDir}/docs/openapi"
}