-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
106 lines (93 loc) · 2.61 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
buildscript {
ext {
queryDslVersion = "5.0.0"
}
}
plugins {
id 'java'
id 'org.springframework.boot' version '2.7.5'
id 'io.spring.dependency-management' version '1.0.15.RELEASE'
id 'com.google.cloud.tools.jib' version '3.2.1'
id 'jacoco'
}
jib {
from {
image = "openjdk:11-jre-slim"
auth {
username = project.DOCKER_ID
password = project.DOCKER_PASSWORD
}
}
to {
image = project.DOCKER_ID + "/" + project.DOCKER_IMAGE_NAME
auth {
username = project.DOCKER_ID
password = project.DOCKER_PASSWORD
}
tags = ["latest"]
}
container {
jvmFlags = ["-Xms128m", "-Xmx128m"]
}
}
group = 'com.techeer'
version = '0.0.1-SNAPSHOT'
sourceCompatibility = '11'
configurations {
compileOnly {
extendsFrom annotationProcessor
}
// 자동 재시작
developmentOnly
runtimeClasspath {
extendsFrom developmentOnly
}
}
repositories {
mavenCentral()
}
dependencies {
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'org.springframework.boot:spring-boot-starter-test'
implementation group: 'org.springframework.boot', name: 'spring-boot-starter-validation', version: '2.7.5'
implementation group: 'org.springframework.boot', name: 'spring-boot-starter-security', version: '2.7.5'
implementation group: 'io.springfox', name: 'springfox-boot-starter', version: '3.0.0'
compileOnly 'org.projectlombok:lombok'
runtimeOnly 'com.h2database:h2'
runtimeOnly 'org.postgresql:postgresql'
annotationProcessor 'org.projectlombok:lombok'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
implementation 'com.github.gavlyukovskiy:p6spy-spring-boot-starter:1.8.1'
// QueryDSL
implementation "com.querydsl:querydsl-jpa:${queryDslVersion}"
annotationProcessor(
"javax.persistence:javax.persistence-api",
"javax.annotation:javax.annotation-api",
"com.querydsl:querydsl-apt:${queryDslVersion}:jpa")
// 자동 재시작
developmentOnly("org.springframework.boot:spring-boot-devtools")
}
tasks.named('test') {
useJUnitPlatform()
finalizedBy jacocoTestReport
}
jacoco {
toolVersion = "0.8.8" // 버전 명시
}
jacocoTestReport {
dependsOn test // 리포트 생성 전에 test를 반드시 수행해야 한다!
reports { // 어떤 파일들을 생성할지, 어디에 생성할지 설정
xml.enabled true // xml과 html형식으로 결과물을 만들어내라!
html.enabled true
// 경로 명시 안 할 경우 기본 경로는 build/reports/jacoco 이하 경로
}
}
// QueryDSL
sourceSets {
main {
java {
srcDirs = ["$projectDir/src/main/java", "$projectDir/build/generated"]
}
}
}