-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
126 lines (89 loc) · 2.79 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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
plugins {
id 'org.springframework.boot' version '2.6.7'
id 'io.spring.dependency-management' version '1.0.11.RELEASE'
//querydsl 추가
id "com.ewerk.gradle.plugins.querydsl" version "1.0.10"
id 'java'
}
group = 'com.cloud'
version = '0.0.1-SNAPSHOT'
sourceCompatibility = '11'
configurations {
compileOnly {
extendsFrom annotationProcessor
}
// Log4j2를 위한 logback 의존성 제거
all {
exclude group: 'org.springframework.boot', module: 'spring-boot-starter-logging'
}
}
repositories {
mavenCentral()
}
dependencies {
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
implementation 'org.springframework.boot:spring-boot-starter-thymeleaf'
implementation 'org.springframework.boot:spring-boot-starter-web'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
// html 파일? 변경 시 서버 파일 변경 안해도 build - rebuild로 적용 가능
implementation 'org.springframework.boot:spring-boot-devtools'
//sql 쿼리 파라미터 값 로그로 남기기
//implementation 'com.github.gavlyukovskiy:p6spy-spring-boot-starter:1.5.7'
//Database connector - MariaDB
runtimeOnly 'org.mariadb.jdbc:mariadb-java-client:3.0.3'
//JUnit4 추가
testImplementation("org.junit.vintage:junit-vintage-engine") {
exclude group: "org.hamcrest", module: "hamcrest-core"
}
//lombok
compileOnly 'org.projectlombok:lombok'
testCompileOnly 'org.projectlombok:lombok'
annotationProcessor 'org.projectlombok:lombok'
// log4j2
implementation 'org.springframework.boot:spring-boot-starter-log4j2'
//security
implementation 'org.springframework.boot:spring-boot-starter-security'
//thymeleaf
implementation 'org.springframework.boot:spring-boot-starter-thymeleaf'
implementation 'org.thymeleaf.extras:thymeleaf-extras-springsecurity5'
//querydsl 추가
implementation "com.querydsl:querydsl-jpa:5.0.0"
annotationProcessor "com.querydsl:querydsl-apt:5.0.0"
//session dB
implementation("org.springframework.session:spring-session-jdbc")
// https://github.com/stleary/JSON-java
implementation files('libs/json-20220320.jar')
// oauth2 client
implementation 'org.springframework.boot:spring-boot-starter-oauth2-client'
}
tasks.named('test') {
useJUnitPlatform()
}
sourceSets {
test{
resources {
srcDirs "${project.projectDir}/src/test/resources", "${project.projectDir}/src/main/resources"
}
}
}
tasks {
processTestResources {
duplicatesStrategy = org.gradle.api.file.DuplicatesStrategy.INCLUDE
}
}
//querydsl 추가 시작
def querydslDir = "$buildDir/generated/querydsl"
querydsl {
jpa = true
querydslSourcesDir = querydslDir
}
sourceSets {
main.java.srcDir querydslDir
}
configurations {
querydsl.extendsFrom compileClasspath
}
compileQuerydsl {
options.annotationProcessorPath = configurations.querydsl
}
//querydsl 추가 끝