-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
101 lines (88 loc) · 3.57 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
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
import java.io.ByteArrayOutputStream
plugins {
id("org.springframework.boot") version "3.3.3" apply false
id("io.spring.dependency-management") version "1.1.0"
id("org.jlleitschuh.gradle.ktlint") version "12.1.1"
kotlin("jvm") version "2.0.20"
kotlin("plugin.spring") version "2.0.20"
}
group = "com.wafflestudio"
version = "0.0.1-SNAPSHOT"
java.sourceCompatibility = JavaVersion.VERSION_17
allprojects {
repositories {
mavenCentral()
mavenCodeArtifact()
mavenLocal()
}
}
subprojects {
apply {
plugin("kotlin")
plugin("org.jlleitschuh.gradle.ktlint")
plugin("org.jetbrains.kotlin.jvm")
plugin("io.spring.dependency-management")
plugin("kotlin-spring")
}
dependencyManagement {
imports {
mavenBom("org.springframework.boot:spring-boot-dependencies:3.3.3")
}
}
dependencies {
implementation("org.jetbrains.kotlin:kotlin-reflect")
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8")
implementation("com.fasterxml.jackson.module:jackson-module-kotlin")
implementation("org.springframework.boot:spring-boot-starter-webflux")
implementation("io.projectreactor.kotlin:reactor-kotlin-extensions")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-reactor")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-jdk8")
implementation("org.springframework.boot:spring-boot-starter-data-mongodb-reactive")
implementation("org.springframework.boot:spring-boot-starter-data-redis")
implementation("com.wafflestudio.truffle.sdk:truffle-spring-boot-starter:1.1.0")
implementation("com.wafflestudio.truffle.sdk:truffle-logback:1.1.0")
implementation("org.springdoc:springdoc-openapi-starter-webflux-ui:2.0.2")
testImplementation("org.springframework.boot:spring-boot-starter-test")
testImplementation("io.projectreactor:reactor-test")
testImplementation("io.mockk:mockk:1.12.4")
testImplementation("io.mockk:mockk-agent-jvm:1.12.4")
testImplementation("com.ninja-squad:springmockk:4.0.0")
testImplementation("io.kotest.extensions:kotest-extensions-spring:1.1.2")
testImplementation("io.kotest:kotest-runner-junit5:5.5.4")
testImplementation("io.kotest:kotest-assertions-core:5.5.4")
}
tasks.withType<KotlinCompile> {
kotlinOptions {
freeCompilerArgs = listOf("-Xjsr305=strict")
jvmTarget = "17"
}
}
tasks.withType<Test> {
useJUnitPlatform()
}
}
fun RepositoryHandler.mavenCodeArtifact() {
maven {
val authToken =
properties["codeArtifactAuthToken"] as String? ?: ByteArrayOutputStream().use {
runCatching {
exec {
commandLine =
listOf(
"aws", "codeartifact", "get-authorization-token",
"--domain", "wafflestudio", "--domain-owner", "405906814034",
"--query", "authorizationToken", "--region", "ap-northeast-1", "--output", "text",
)
standardOutput = it
}
}
it.toString()
}
url = uri("https://wafflestudio-405906814034.d.codeartifact.ap-northeast-1.amazonaws.com/maven/truffle-kotlin/")
credentials {
username = "aws"
password = authToken
}
}
}