forked from depromeet/bodymood-backend
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle
130 lines (108 loc) · 3.4 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
buildscript {
ext {
springBootVersion = '2.5.4'
kotlinVersion = '1.5.31'
kotestVersion = '4.4.3'
springCloudVersion = '2020.0.4'
lombokPluginVersion = '6.1.0'
}
repositories {
maven {
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:${kotlinVersion}")
classpath("org.jetbrains.kotlin:kotlin-allopen:${kotlinVersion}")
classpath("org.jetbrains.kotlin:kotlin-noarg:${kotlinVersion}")
classpath("org.jetbrains.kotlin:kotlin-lombok:${kotlinVersion}")
classpath("io.freefair.gradle:lombok-plugin:${lombokPluginVersion}")
}
}
subprojects {
group = 'com.depromeet.dgdg'
apply {
plugin('java-library')
plugin('eclipse')
plugin('org.springframework.boot')
plugin('io.spring.dependency-management')
plugin('kotlin')
plugin('kotlin-spring')
plugin('kotlin-jpa')
plugin('kotlin-kapt')
plugin('jacoco')
plugin('org.jetbrains.kotlin.plugin.lombok')
plugin('io.freefair.lombok')
}
sourceCompatibility = '11'
compileKotlin {
kotlinOptions {
jvmTarget = "11"
freeCompilerArgs = ["-Xjsr305=strict"]
}
}
compileTestKotlin {
kotlinOptions {
jvmTarget = "11"
freeCompilerArgs = ["-Xjsr305=strict"]
}
}
repositories {
mavenCentral()
}
jacoco {
toolVersion = "0.8.7"
reportsDir = file("${rootProject.projectDir}/build")
}
kapt {
keepJavacAnnotationProcessors = true
}
dependencies {
implementation("org.springframework.boot:spring-boot-starter-validation")
testImplementation('org.springframework.boot:spring-boot-starter-test')
annotationProcessor("org.springframework.boot:spring-boot-configuration-processor")
// kotlin
implementation("org.jetbrains.kotlin:kotlin-stdlib")
implementation("org.jetbrains.kotlin:kotlin-reflect")
implementation("com.fasterxml.jackson.module:jackson-module-kotlin")
//lombok
compileOnly'org.projectlombok:lombok'
annotationProcessor 'org.projectlombok:lombok'
// kotest
testImplementation("io.kotest:kotest-runner-junit5:${kotestVersion}")
testImplementation("io.kotest:kotest-extensions-spring:${kotestVersion}")
// mockk
testImplementation("io.mockk:mockk:1.12.0")
}
configurations {
compileOnly {
extendsFrom annotationProcessor
}
}
test {
useJUnitPlatform()
finalizedBy jacocoTestReport
}
dependencyManagement {
imports {
mavenBom "org.springframework.cloud:spring-cloud-dependencies:${springCloudVersion}"
}
}
jacocoTestReport {
reports {
xml.enabled true
html.enabled true
}
// QueryDSL codecov report 대상 제외
def Qdomains = []
for(qPattern in "**/QA" .. "**/QZ"){
Qdomains.add(qPattern+"*")
}
afterEvaluate {
classDirectories.setFrom(files(classDirectories.files.collect {
fileTree(dir: it, exclude: [] + Qdomains)
}))
}
}
}