-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbuild.gradle.kts
More file actions
101 lines (91 loc) · 2.86 KB
/
Copy pathbuild.gradle.kts
File metadata and controls
101 lines (91 loc) · 2.86 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
import com.diffplug.gradle.spotless.SpotlessExtension
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
plugins {
id("com.diffplug.spotless") version "8.4.0"
id("org.graalvm.buildtools.native") version "0.11.3" apply false
id("org.springframework.boot") version "4.0.1" apply false
id("io.spring.dependency-management") version "1.1.7"
kotlin("jvm") version "2.3.0"
kotlin("plugin.spring") version "2.2.0"
}
group = "com.wafflestudio"
version = "0.0.1-SNAPSHOT"
allprojects {
repositories {
mavenCentral()
maven {
url = uri("https://maven.pkg.github.com/wafflestudio/spring-waffle")
credentials {
username = "wafflestudio"
password = findProperty("gpr.key") as String?
?: System.getenv("GITHUB_TOKEN")
?: runCatching {
ProcessBuilder("gh", "auth", "token")
.start()
.inputStream
.bufferedReader()
.readText()
.trim()
}.getOrDefault("")
}
}
mavenLocal()
}
}
spotless {
kotlinGradle {
target("*.gradle.kts")
ktlint("1.8.0")
}
}
subprojects {
apply {
plugin("com.diffplug.spotless")
plugin("org.graalvm.buildtools.native")
plugin("kotlin")
plugin("org.jetbrains.kotlin.jvm")
plugin("io.spring.dependency-management")
plugin("kotlin-spring")
}
configure<SpotlessExtension> {
kotlin {
target("src/**/*.kt")
ktlint("1.8.0")
}
kotlinGradle {
target("*.gradle.kts")
ktlint("1.8.0")
}
}
dependencyManagement {
imports {
mavenBom("org.springframework.boot:spring-boot-dependencies:4.0.1")
}
dependencies {
// Downgrade MongoDB driver to avoid ByteBuf leak (JAVA-6038)
dependency("org.mongodb:mongodb-driver-core:5.5.2")
dependency("org.mongodb:mongodb-driver-sync:5.5.2")
dependency("org.mongodb:mongodb-driver-reactivestreams:5.5.2")
dependency("org.mongodb:bson:5.5.2")
dependency("org.mongodb:bson-record-codec:5.5.2")
dependency("org.mongodb:bson-kotlin:5.5.2")
}
}
tasks.withType<KotlinCompile> {
compilerOptions {
freeCompilerArgs.add("-Xjsr305=strict")
jvmTarget.set(JvmTarget.JVM_25)
}
}
java {
sourceCompatibility = JavaVersion.VERSION_25
targetCompatibility = JavaVersion.VERSION_25
toolchain {
languageVersion.set(JavaLanguageVersion.of(25))
}
}
tasks.withType<Test> {
useJUnitPlatform()
}
}