-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
214 lines (162 loc) · 4.85 KB
/
build.gradle.kts
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
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
import org.springframework.boot.gradle.tasks.bundling.BootJar
plugins {
id("java")
id("java-library")
kotlin("jvm") version "1.9.21"
kotlin("plugin.spring") version "1.9.21" apply false
kotlin("plugin.jpa") version "1.9.21" apply false
id("org.springframework.boot") version "3.2.1" apply false
id("io.spring.dependency-management") version "1.1.4"
}
java.sourceCompatibility = JavaVersion.VERSION_17
allprojects {
group = "com.pophory"
version = "0.0.1-SNAPSHOT"
repositories {
mavenCentral()
}
tasks.withType<KotlinCompile> {
kotlinOptions {
freeCompilerArgs = listOf("-Xjsr305=strict")
jvmTarget = "17"
}
}
tasks.withType<Test> {
useJUnitPlatform()
}
}
allprojects {
group = "com.pophory"
version = "0.0.1-SNAPSHOT"
repositories {
mavenCentral()
}
tasks.withType<KotlinCompile> {
kotlinOptions {
freeCompilerArgs = listOf("-Xjsr305=strict")
jvmTarget = "17"
}
}
repositories {
mavenCentral()
}
}
subprojects {
apply {
plugin("org.jetbrains.kotlin.jvm")
plugin("kotlin-spring")
}
dependencies {
implementation(kotlin("stdlib"))
implementation("org.jetbrains.kotlin:kotlin-reflect")
// lombok
annotationProcessor("org.projectlombok:lombok")
compileOnly("org.projectlombok:lombok")
testImplementation("org.springframework.boot:spring-boot-starter-test")
testImplementation("org.springframework.security:spring-security-test")
// kotest
val kotestVersion = "5.8.0"
testImplementation("io.kotest:kotest-runner-junit5:$kotestVersion")
testImplementation("io.kotest:kotest-assertions-core:$kotestVersion")
}
configurations {
"compileOnly" {
extendsFrom(configurations.annotationProcessor.get())
}
}
tasks.withType<Test> {
useJUnitPlatform()
}
}
project("pophory-api") {
apply {
plugin("io.spring.dependency-management")
plugin("org.springframework.boot")
}
dependencies {
api(project(":pophory-common"))
api(project(":pophory-domain"))
api(project(":pophory-external"))
// swagger"
implementation("org.springdoc:springdoc-openapi-starter-webmvc-ui:2.3.0")
implementation("org.springdoc:springdoc-openapi-starter-common:2.3.0")
// Spring boot
implementation("org.springframework.boot:spring-boot-starter-validation")
implementation("org.springframework.boot:spring-boot-starter-data-jpa")
implementation("org.springframework.boot:spring-boot-starter-web")
// JWT
implementation("io.jsonwebtoken", "jjwt-api", "0.11.5")
implementation("io.jsonwebtoken", "jjwt-impl", "0.11.5")
implementation("io.jsonwebtoken", "jjwt-jackson", "0.11.5")
implementation("com.google.code.gson:gson:2.10.1")
// FCM
implementation("com.google.firebase:firebase-admin:9.1.1")
// AWS S3
implementation("org.springframework.cloud:spring-cloud-starter-aws:2.2.6.RELEASE")
// Security
implementation("org.springframework.boot:spring-boot-starter-security")
testImplementation("org.springframework.security:spring-security-test")
}
val jar: Jar by tasks
val bootJar: BootJar by tasks
bootJar.enabled = true
jar.enabled = false
}
project("pophory-common") {
apply {
plugin("io.spring.dependency-management")
plugin("org.springframework.boot")
}
dependencies {
api(project(":pophory-external"))
// Spring boot
implementation ("org.springframework.boot:spring-boot-starter-data-jpa")
implementation ("org.springframework.boot:spring-boot-starter-web")
// sentry
implementation("io.sentry:sentry-spring-boot-starter:6.23.0")
// JWT
implementation("io.jsonwebtoken", "jjwt-api", "0.11.5")
implementation("io.jsonwebtoken", "jjwt-impl", "0.11.5")
implementation("io.jsonwebtoken", "jjwt-jackson", "0.11.5")
implementation("com.google.code.gson:gson:2.10.1")
// Security
implementation("org.springframework.boot:spring-boot-starter-security")
testImplementation("org.springframework.security:spring-security-test")
}
val jar: Jar by tasks
val bootJar: BootJar by tasks
bootJar.enabled = false
jar.enabled = true
}
project("pophory-domain") {
apply {
plugin("io.spring.dependency-management")
plugin("org.springframework.boot")
}
dependencies {
api(project(":pophory-common"))
implementation("org.springframework.boot:spring-boot-starter-web")
implementation("org.springframework.boot:spring-boot-starter-validation")
implementation("org.springframework.boot:spring-boot-starter-data-jpa")
// Database
runtimeOnly("com.h2database:h2")
runtimeOnly("com.mysql:mysql-connector-j")
runtimeOnly("org.postgresql:postgresql")
}
val jar: Jar by tasks
val bootJar: BootJar by tasks
bootJar.enabled = false
jar.enabled = true
}
project("pophory-external") {
apply {
plugin("io.spring.dependency-management")
plugin("org.springframework.boot")
}
val jar: Jar by tasks
val bootJar: BootJar by tasks
bootJar.enabled = false
jar.enabled = true
}
tasks.getByName<Jar>("jar").enabled = false