-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
108 lines (83 loc) · 2.63 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
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
id("org.springframework.boot") version PluginVersions.SPRING_BOOT_VERSION
id("io.spring.dependency-management") version PluginVersions.DEPENDENCY_MANAGER_VERSION
id("org.jlleitschuh.gradle.ktlint") version PluginVersions.KLINT_VERSION
kotlin("jvm") version PluginVersions.JVM_VERSION
kotlin("plugin.spring") version PluginVersions.SPRING_PLUGIN_VERSION
kotlin("plugin.jpa") version PluginVersions.JPA_PLUGIN_VERSION
id("com.epages.restdocs-api-spec") version PluginVersions.API_SPEC
}
dependencyManagement {
imports {
mavenBom(Dependencies.SPRING_CLOUD)
}
}
group = "hs.kr.equus"
version = "0.0.0"
java {
sourceCompatibility = JavaVersion.VERSION_17
}
repositories {
mavenCentral()
maven { url = uri("https://repo.spring.io/milestone") }
maven { url = uri("https://repo.spring.io/snapshot") }
}
dependencies {
// Database
implementation(Dependencies.SPRING_DATA_JPA)
implementation(Dependencies.SPRING_REDIS)
runtimeOnly(Dependencies.MYSQL_CONNECTOR)
// Web
implementation(Dependencies.SPRING_WEB)
// Security
implementation(Dependencies.SPRING_SECURITY)
// Kotlin
implementation(Dependencies.JACKSON)
implementation(Dependencies.KOTLIN_REFLECT)
// Test
testImplementation(Dependencies.SPRING_TEST)
// Logging
implementation(Dependencies.SENTRY)
// Valid
implementation(Dependencies.SPRING_VALIDATION)
// Gson
implementation(Dependencies.JSON)
// OkCert
implementation(files("$projectDir/${Dependencies.OKCERT_PATH}"))
// Jwt
implementation(Dependencies.JWT)
// Kafka
implementation(Dependencies.KAFKA)
// Spring Config
implementation(Dependencies.CLOUD_CONFIG)
// Actuator
implementation(Dependencies.ACTUATOR)
// Cache
implementation("org.springframework.boot:spring-boot-starter-cache")
testImplementation(Dependencies.MOCK_BEAN)
testImplementation(Dependencies.API_SPEC)
implementation(Dependencies.SWAGGER_UI)
}
tasks.withType<KotlinCompile> {
kotlinOptions {
freeCompilerArgs += "-Xjsr305=strict"
jvmTarget = "17"
}
}
tasks.withType<Test> {
useJUnitPlatform()
}
openapi3 {
this.setServer("https://localhost:8080")
title = "Equus User API"
description = "Equus User API Description"
version = "0.1.0"
format = "yaml"
}
tasks.register<Copy>("copyOasToSwagger") {
delete("src/main/resources/static/swagger-ui/openapi3.yaml")
from("$buildDir/api-spec/openapi3.yaml")
into("src/main/resources/static/swagger-ui/.")
dependsOn("openapi3")
}