-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
149 lines (109 loc) · 4.2 KB
/
build.gradle.kts
File metadata and controls
149 lines (109 loc) · 4.2 KB
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
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
`java-test-fixtures`
id("org.springframework.boot") version "3.2.4"
id("io.spring.dependency-management") version "1.1.4"
id("org.asciidoctor.jvm.convert") version "4.0.2"
kotlin("jvm") version "1.9.23"
kotlin("plugin.spring") version "1.9.23"
kotlin("plugin.jpa") version "1.9.23"
}
group = "com.asap"
version = ""
java {
sourceCompatibility = JavaVersion.VERSION_17
}
repositories {
mavenCentral()
}
val kotestVersion = "5.8.1"
val mockkVersion = "1.13.10"
extra["springModulithVersion"] = "1.2.1"
val asciidoctorExt = "asciidoctorExt"
configurations.create(asciidoctorExt) {
extendsFrom(configurations.testImplementation.get())
}
dependencies {
implementation("org.springframework.boot:spring-boot-starter-actuator")
implementation("org.springframework.boot:spring-boot-starter-web")
implementation("com.fasterxml.jackson.module:jackson-module-kotlin")
implementation("org.jetbrains.kotlin:kotlin-reflect")
// spring test
testImplementation("org.springframework.boot:spring-boot-starter-test")
testFixturesImplementation("org.springframework.boot:spring-boot-starter-test")
// jpa
implementation("org.springframework.boot:spring-boot-starter-data-jpa")
//mysql
runtimeOnly("com.mysql:mysql-connector-j")
// security
implementation("org.springframework.boot:spring-boot-starter-security")
testImplementation("org.springframework.security:spring-security-test")
// kotest
testImplementation("io.kotest:kotest-runner-junit5:$kotestVersion") // Test Framework
testImplementation("io.kotest:kotest-assertions-core:$kotestVersion") // Assertions Library
testImplementation("io.kotest:kotest-property:$kotestVersion") // Property Testing
// mockk
testImplementation("io.mockk:mockk:${mockkVersion}")
testFixturesImplementation("io.mockk:mockk:${mockkVersion}")
// fixture monkey
testImplementation("com.navercorp.fixturemonkey:fixture-monkey-starter-kotlin:1.0.16")
testFixturesImplementation("com.navercorp.fixturemonkey:fixture-monkey-starter-kotlin:1.0.16")
// JWT
implementation("io.jsonwebtoken:jjwt-api:0.12.5")
implementation("io.jsonwebtoken:jjwt-impl:0.12.5")
implementation("io.jsonwebtoken:jjwt-jackson:0.12.5")
// caffeine
implementation("com.github.ben-manes.caffeine:caffeine:3.1.8")
// RestDocs
testImplementation("org.springframework.restdocs:spring-restdocs-mockmvc")
asciidoctorExt("org.springframework.restdocs:spring-restdocs-asciidoctor")
testFixturesImplementation("org.springframework.restdocs:spring-restdocs-mockmvc")
// webclient
// if(System.getProperty("os.name") == "Mac OS X" && System.getProperty("os.arch") == "aarch64")
runtimeOnly("io.netty:netty-resolver-dns-native-macos:4.1.109.Final:osx-aarch_64")
implementation("org.springframework.boot:spring-boot-starter-webflux")
// logger
implementation("io.github.oshai:kotlin-logging-jvm:5.1.0")
// kotlin coroutine
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.8.0")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-reactor:1.8.0")
// spring modulith
implementation("org.springframework.modulith:spring-modulith-starter-core")
implementation("org.springframework.modulith:spring-modulith-starter-jpa")
}
dependencyManagement {
imports {
mavenBom("org.springframework.modulith:spring-modulith-bom:${property("springModulithVersion")}")
}
}
tasks.withType<KotlinCompile> {
kotlinOptions {
freeCompilerArgs += "-Xjsr305=strict"
jvmTarget = "17"
}
}
val snippetDir = file("build/generated-snippets")
tasks.test {
outputs.dir(snippetDir)
useJUnitPlatform()
}
tasks.asciidoctor {
inputs.dir(snippetDir)
dependsOn(tasks.test)
configurations(asciidoctorExt)
baseDirFollowsSourceFile()
}
tasks.bootJar{
dependsOn(tasks.asciidoctor)
from("build/docs/asciidoc"){
into("static/docs")
}
}
tasks.register("copyDocs", Copy::class){
dependsOn(tasks.bootJar)
from("build/docs/asciidoc")
into("src/main/resources/static/docs")
}
tasks.build {
dependsOn(tasks.getByName("copyDocs"))
}