-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
130 lines (112 loc) · 3.33 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
127
128
129
130
plugins {
id 'org.springframework.boot' version '2.6.13'
id 'io.spring.dependency-management' version '1.0.15.RELEASE'
id 'java'
id "org.asciidoctor.jvm.convert" version "3.3.2"
id 'jacoco'
id "com.ewerk.gradle.plugins.querydsl" version "1.0.10"
id 'com.google.cloud.tools.jib' version '3.2.1'
}
group = 'com.kim1387'
version = '0.0.1-SNAPSHOT'
sourceCompatibility = '11'
configurations {
asciidoctorExtensions
compileOnly {
extendsFrom annotationProcessor
}
}
repositories {
mavenCentral()
}
ext {
set('snippetsDir', file("build/generated-snippets"))
set('springCloudVersion', "Hoxton.SR12")
queryDslVersion = "5.0.0"
}
jib {
from {
image = "openjdk:11-jre-slim"
}
to {
image = "ce19f003/travel-backend"
tags = ["latest"]
}
container {
jvmFlags = ["-Xms128m", "-Xmx128m"]
}
}
dependencies {
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
implementation 'org.springframework.boot:spring-boot-starter-validation'
//querydsl 추가
implementation "com.querydsl:querydsl-jpa:${queryDslVersion}"
annotationProcessor "com.querydsl:querydsl-apt:${queryDslVersion}"
implementation('com.google.guava:guava:31.1-android')
//swagger-ui
implementation 'org.springdoc:springdoc-openapi-ui:1.6.8'
implementation 'org.flywaydb:flyway-core'
implementation 'com.fasterxml.jackson.datatype:jackson-datatype-jsr310'
compileOnly 'org.projectlombok:lombok'
runtimeOnly 'com.h2database:h2'
runtimeOnly 'com.mysql:mysql-connector-j'
annotationProcessor 'org.springframework.boot:spring-boot-configuration-processor'
annotationProcessor 'org.projectlombok:lombok'
implementation 'io.rest-assured:rest-assured-common:4.4.0'
testImplementation 'io.rest-assured:spring-mock-mvc:4.4.0'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
testImplementation 'org.springframework.restdocs:spring-restdocs-mockmvc'
asciidoctorExtensions 'org.springframework.restdocs:spring-restdocs-asciidoctor'
}
tasks.named('test') {
outputs.dir snippetsDir
useJUnitPlatform()
}
tasks.named('asciidoctor') {
inputs.dir snippetsDir
dependsOn test
}
jacocoTestReport {
reports {
html.enabled true
xml.enabled false
csv.enabled true
}
finalizedBy 'jacocoTestCoverageVerification'
}
jacocoTestCoverageVerification {
violationRules {
rule {
enabled = true
element = 'CLASS'
limit {
counter = 'METHOD'
value = 'COVEREDRATIO'
minimum = 0.00
}
limit {
counter = 'INSTRUCTION'
value = 'COVEREDRATIO'
minimum = 0.00
}
excludes = ["*.dto.*", "*.global.*", "*.dto*", "*.TravelApplication*", "*.config.*", "*.exceptions.*"]
}
}
}
//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 추가 끝