-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle
More file actions
104 lines (87 loc) · 3.45 KB
/
build.gradle
File metadata and controls
104 lines (87 loc) · 3.45 KB
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
plugins {
id 'java'
id 'org.springframework.boot' version '3.1.5'
id 'io.spring.dependency-management' version '1.1.3'
id 'org.asciidoctor.jvm.convert' version '3.3.2' // asciidoctor convert 사용
}
group = 'com.personal'
version = '0.0.1-SNAPSHOT'
java {
sourceCompatibility = '17'
}
configurations {
asciidoctorExt // html 자동 변경 사용 설정
compileOnly {
extendsFrom annotationProcessor
}
}
repositories {
mavenCentral()
}
ext {
set('snippetsDir', file("build/generated-snippets")) // snippetsDir 위치 설정
}
dependencies {
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
implementation 'org.springframework.boot:spring-boot-starter-validation'
implementation 'org.springframework.boot:spring-boot-starter-web'
// Redis 설치
implementation 'org.springframework.boot:spring-boot-starter-data-redis'
// 'p6spy' 설치
implementation "com.github.gavlyukovskiy:p6spy-spring-boot-starter:1.9.0"
// 시큐리티 설치
implementation 'org.springframework.boot:spring-boot-starter-security'
// JWT 토큰 관련 라이브러리 설치
implementation group: 'io.jsonwebtoken', name: 'jjwt-api', version: '0.11.5'
runtimeOnly group: 'io.jsonwebtoken', name: 'jjwt-impl', version: '0.11.5'
runtimeOnly group: 'io.jsonwebtoken', name: 'jjwt-jackson', version: '0.11.5'
// Querydsl 설치
implementation 'com.querydsl:querydsl-jpa:5.0.0:jakarta'
annotationProcessor "com.querydsl:querydsl-apt:${dependencyManagement.importedProperties['querydsl.version']}:jakarta"
annotationProcessor("jakarta.persistence:jakarta.persistence-api")
annotationProcessor("jakarta.annotation:jakarta.annotation-api")
// Discord Bot JDA 의존성
implementation 'net.dv8tion:JDA:5.0.0-beta.12'
//Json Object 및 Parser
implementation group: 'com.googlecode.json-simple', name: 'json-simple', version: '1.1.1'
compileOnly 'org.projectlombok:lombok'
runtimeOnly 'com.mysql:mysql-connector-j'
annotationProcessor 'org.projectlombok:lombok'
// 'RestDocs' 설치 (.adocs를 html로 자동 변화)
asciidoctorExt 'org.springframework.restdocs:spring-restdocs-asciidoctor'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
testImplementation 'org.springframework.restdocs:spring-restdocs-mockmvc'
// 시큐리티 테스트 설치
testImplementation 'org.springframework.security:spring-security-test'
// 테스트용 DB `H2` 설치
testImplementation 'com.h2database:h2'
}
tasks.named('test') {
useJUnitPlatform()
}
tasks.named('asciidoctor') {
inputs.dir snippetsDir
dependsOn test
configurations 'asciidoctorExt' // html 자동 변경 사용
baseDirFollowsSourceFile() // .adoc 파일에서 다른.adoc 파일을 include하여 사용할 때 경로를 동일하게 baseDir로 설정
}
asciidoctor.doFirst {
delete file('src/main/resources/static/docs') //실행 전 이전 html 삭제
}
// build/docs/asciidoc 에 생성된 html 문서를 src/main/resources/static/docs 에 복사해온다.
task createDocument(type: Copy) {
dependsOn asciidoctor // asciidoctor 후 실행
from file("build/docs/asciidoc")
into file("src/main/resources/static")
}
//jar의 static/docs에 문서 복사
bootJar {
dependsOn createDocument
from("${asciidoctor.outputDir}") {
into 'static/docs'
}
}
//빌드전 createDocument 실행
build {
dependsOn createDocument
}