-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.gradle.kts
117 lines (99 loc) · 3.04 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
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
alias(libs.plugins.springBoot)
alias(libs.plugins.kotlin.jvm)
alias(libs.plugins.kotlin.spring)
id("eco.swarm.cloud.jooq-kotlin-generation")
application
}
repositories { mavenCentral() }
group = "eco.swarm.cloud"
version = "0.1.0-SNAPSHOT"
dependencies {
// Dependency versions
implementation(platform(libs.springBootDependencies))
runtimeOnly(platform(libs.springBootDependencies))
developmentOnly(platform(libs.springBootDependencies))
// Core dependencies
implementation(libs.springBootStarter)
implementation(libs.springBootStarterWebflux)
// Kotlin coroutines
implementation(libs.bundles.kotlinCoroutines)
// Kotlin JSON support
implementation(libs.jacksonModuleKotlin)
// Database connectivity
implementation(libs.springBootStarterDataR2dbc)
runtimeOnly(libs.postgresJdbc)
runtimeOnly(libs.postgresR2dbc)
runtimeOnly(libs.flywayCore)
// SQL queries
implementation(libs.springBootStarterJooq)
implementation(libs.bundles.jooq)
// Dev tools
developmentOnly(libs.springBootDevtools)
developmentOnly(libs.springBootDockerCompose)
}
tasks.bootRun {
systemProperty("spring.profiles.active", "local")
systemProperty("org.jooq.no-logo", true)
systemProperty("org.jooq.no-tips", true)
}
tasks.generateJooq {
imageName = "postgres:16.2"
inputSchema = "swarm"
outputPackage = "eco.swarm.cloud.interview.db"
}
testing {
suites {
val test by getting(JvmTestSuite::class) {
useJUnitJupiter(libs.versions.junit)
dependencies {
implementation(libs.springBootStarterTest)
implementation(libs.kotlinCoroutinesTest)
implementation(libs.mockk)
implementation(libs.springMockk)
implementation(libs.kotest)
implementation(libs.kotestSpring)
}
}
val integrationTest by registering(JvmTestSuite::class) {
testType = TestSuiteType.INTEGRATION_TEST
useJUnitJupiter(libs.versions.junit)
dependencies {
implementation(project())
implementation(platform(libs.springBootDependencies))
implementation(libs.jooq)
implementation(libs.springBootStarterTest)
implementation(libs.kotlinCoroutinesTest)
implementation(libs.flywayCore)
implementation(libs.mockk)
implementation(libs.springMockk)
implementation(libs.kotest)
implementation(libs.kotestSpring)
implementation(libs.kotestTestcontainers)
implementation(libs.testcontainersR2dbc)
implementation(libs.testcontainersPostgres)
}
}
}
}
java {
toolchain {
languageVersion = JavaLanguageVersion.of(17)
}
}
tasks.withType<JavaCompile> {
options.encoding = "UTF-8"
options.compilerArgs.add("-Xlint")
}
tasks.withType<Test> {
systemProperty("org.jooq.no-logo", true)
systemProperty("org.jooq.no-tips", true)
}
tasks.withType<KotlinCompile> {
kotlinOptions {
compilerOptions { jvmTarget.set(JvmTarget.JVM_17) }
freeCompilerArgs += "-Xjsr305=strict"
}
}