-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle.kts
74 lines (63 loc) · 2.46 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
import org.springframework.boot.gradle.tasks.bundling.BootBuildImage
plugins {
java
id("org.springframework.boot") version "3.3.0"
id("io.spring.dependency-management") version "1.1.5"
id("org.graalvm.buildtools.native") version "0.10.2"
}
graalvmNative {
binaries.all {
buildArgs.add("-H:-AddAllFileSystemProviders")
}
}
val springCloudVersion = "2023.0.2"
dependencyManagement {
imports {
mavenBom("org.springframework.cloud:spring-cloud-dependencies:${springCloudVersion}")
}
}
java.toolchain {
languageVersion.set(JavaLanguageVersion.of(22))
}
group = "de.wisskirchenj"
version = "0.2.2"
val dockerHubRepo = "wisskirchenj/"
configurations {
compileOnly {
extendsFrom(configurations.annotationProcessor.get())
}
}
repositories {
mavenCentral()
maven {
url = uri("https://repo.spring.io/snapshot") // to use snapshot versions
}
}
dependencies {
implementation("org.springframework.boot:spring-boot-starter-oauth2-client")
implementation("org.springframework.boot:spring-boot-starter-data-jpa")
implementation("org.springframework.boot:spring-boot-starter-validation")
implementation("org.springframework.boot:spring-boot-starter-actuator")
implementation("org.springframework.cloud:spring-cloud-starter-gateway-mvc")
compileOnly("org.projectlombok:lombok")
developmentOnly("org.springframework.boot:spring-boot-devtools")
runtimeOnly("org.postgresql:postgresql")
annotationProcessor("org.projectlombok:lombok")
annotationProcessor("org.springframework.boot:spring-boot-configuration-processor")
testImplementation("org.springframework.boot:spring-boot-starter-test")
testImplementation("org.springframework.security:spring-security-test")
testImplementation("org.springframework.boot:spring-boot-testcontainers")
testImplementation("org.testcontainers:junit-jupiter")
testImplementation("org.testcontainers:postgresql")
}
tasks.withType<Test> {
useJUnitPlatform()
}
tasks.named<BootBuildImage>("bootBuildImage") {
// buildpacks.set(listOf("paketobuildpacks/java:latest")) // for JVM
buildpacks.set(listOf("paketobuildpacks/java-native-image:latest"))
builder.set("paketobuildpacks/builder-jammy-buildpackless-tiny")
environment.put("BP_NATIVE_IMAGE_BUILD_ARGUMENTS", "-H:-AddAllFileSystemProviders")
imageName.set(dockerHubRepo + rootProject.name + ":" + version + "-" + System.getProperty("os.arch"))
createdDate.set("now")
}