-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.gradle.kts
95 lines (76 loc) · 2.82 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
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
id("org.springframework.boot") version "3.3.5"
id("io.spring.dependency-management") version "1.1.6"
id("com.google.cloud.tools.jib") version "3.4.4"
id("jacoco")
kotlin("jvm") version "2.0.21"
kotlin("plugin.spring") version "2.0.21"
kotlin("plugin.jpa") version "2.1.0"
}
group = "dev.stonegarden"
version = "0.0.2-SNAPSHOT"
val javaVersion = JavaVersion.VERSION_21
tasks.register("printVersion") {
doLast {
println(project.version)
}
}
java {
sourceCompatibility = javaVersion
}
repositories {
mavenCentral()
}
jib {
from {
image = "gcr.io/distroless/java${javaVersion.majorVersion}-debian12:nonroot"
platforms {
platform {
architecture = "amd64"
os = "linux"
}
platform {
architecture = "arm64"
os = "linux"
}
}
}
}
dependencies {
val mockkVersion = "1.13.13"
val h2Version = "2.3.232"
val flywayVersion = "10.21.0"
val openapiVersion = "2.6.0"
annotationProcessor("org.springframework.boot:spring-boot-configuration-processor")
developmentOnly("org.springframework.boot:spring-boot-devtools")
implementation("org.jetbrains.kotlin:kotlin-reflect")
implementation("com.fasterxml.jackson.module:jackson-module-kotlin")
implementation("org.springdoc:springdoc-openapi-starter-webmvc-ui:${openapiVersion}")
implementation("org.springframework.boot:spring-boot-starter-data-jpa")
//implementation("org.springframework.boot:spring-boot-starter-hateoas")
implementation("org.springframework.boot:spring-boot-starter-jdbc")
implementation("org.springframework.boot:spring-boot-starter-security")
implementation("org.springframework.boot:spring-boot-starter-web")
implementation("org.springframework.boot:spring-boot-starter-actuator")
implementation("org.flywaydb:flyway-core:${flywayVersion}")
implementation("org.flywaydb:flyway-database-postgresql:${flywayVersion}")
runtimeOnly("org.postgresql:postgresql")
runtimeOnly("com.h2database:h2:${h2Version}")
testImplementation("org.springframework.boot:spring-boot-starter-test")
testImplementation("org.springframework.security:spring-security-test")
testImplementation("org.flywaydb:flyway-core:${flywayVersion}")
testImplementation("org.jetbrains.kotlin:kotlin-test")
testImplementation("io.mockk:mockk:${mockkVersion}")
testRuntimeOnly("com.h2database:h2:${h2Version}")
testImplementation("org.junit.jupiter:junit-jupiter")
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
}
tasks.withType<KotlinCompile> {
compilerOptions {
freeCompilerArgs.add("-Xjsr305=strict")
}
}
tasks.withType<Test> {
useJUnitPlatform()
}