-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle.kts
88 lines (76 loc) · 3.03 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
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
import org.jetbrains.kotlin.gradle.tasks.KotlinJvmCompile
plugins {
java
jacoco
id("com.adarshr.test-logger") version "4.0.+"
id("io.freefair.lombok") version "8.+"
id("io.spring.dependency-management") version "1.1.+"
id("org.jetbrains.kotlin.jvm") version "2.1.+"
id("org.springframework.boot") version "3.4.+"
}
repositories {
mavenCentral()
}
tasks.bootRun {
jvmArgs = listOf("-Xms2g", "-Xmx2g", "-XX:+ExitOnOutOfMemoryError", "-Djdk.tracePinnedThreads=full")
}
val javaBytecodeVersion = project.findProperty("java.bytecode.version")?.toString() ?: "21"
.also { println("Java bytecode version: $it") }
tasks.withType<JavaCompile>().configureEach {
sourceCompatibility = javaBytecodeVersion
targetCompatibility = javaBytecodeVersion
}
tasks.withType<KotlinJvmCompile> {
compilerOptions {
jvmTarget.set(JvmTarget.fromTarget(javaBytecodeVersion))
}
}
dependencyManagement {
imports {
mavenBom("org.testcontainers:testcontainers-bom:1.20.+")
}
}
extra["httpclient5.version"] = "5.4"
extra["httpcore5.version"] = "5.3"
dependencies {
implementation("com.github.ben-manes.caffeine:caffeine")
implementation("com.google.guava:guava:33.3.+")
implementation("io.github.oshai:kotlin-logging-jvm:7.0.+")
implementation("org.apache.httpcomponents.client5:httpclient5")
implementation("org.jetbrains.kotlin:kotlin-stdlib:2.1.+")
implementation("org.springframework.boot:spring-boot-starter-actuator")
implementation("org.springframework.boot:spring-boot-starter-cache")
implementation("org.springframework.boot:spring-boot-starter-data-jpa")
implementation("org.springframework.boot:spring-boot-starter-webflux")
runtimeOnly("com.h2database:h2")
runtimeOnly("org.postgresql:postgresql:42.+")
testImplementation("io.github.hakky54:logcaptor:2.10.+")
testImplementation("org.apache.commons:commons-compress:1.27.+")
testImplementation("org.assertj:assertj-core")
testImplementation("org.junit.jupiter:junit-jupiter")
testImplementation("org.junit-pioneer:junit-pioneer:2.3.+")
testImplementation("org.mockito.kotlin:mockito-kotlin:5.4.+")
testImplementation("org.springframework.boot:spring-boot-starter-test")
testImplementation("org.springframework.boot:spring-boot-testcontainers")
testImplementation("org.testcontainers:junit-jupiter")
testImplementation("org.testcontainers:postgresql")
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
}
val activeProfiles = System.getenv("SPRING_PROFILES_ACTIVE")
if (activeProfiles?.contains("platform-tomcat") == true || activeProfiles?.contains("loom-tomcat") == true) {
dependencies {
implementation("org.springframework.boot:spring-boot-starter-web")
}
println("Added spring-boot-starter-web dependency")
}
tasks.test {
useJUnitPlatform()
maxParallelForks = 2
jvmArgs("-XX:+EnableDynamicAgentLoading", "-Xshare:off")
}
tasks.jacocoTestReport {
reports {
xml.required.set(true)
}
}