@@ -5,7 +5,7 @@ import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
55
66plugins {
77 // spring
8- id(" org.springframework.boot" ) version " 3.5.5 "
8+ id(" org.springframework.boot" ) version " 3.5.7 "
99 id(" io.spring.dependency-management" ) version " 1.1.7"
1010
1111 // detekt
@@ -25,12 +25,6 @@ version = "4.0.0"
2525
2626java.sourceCompatibility = JavaVersion .VERSION_21
2727
28- configurations {
29- compileOnly {
30- extendsFrom(configurations.annotationProcessor.get())
31- }
32- }
33-
3428repositories {
3529 mavenCentral()
3630}
@@ -134,6 +128,39 @@ tasks {
134128 test {
135129 useJUnitPlatform()
136130 }
131+
132+ bootJar {
133+ layered {
134+ enabled.set(true )
135+ application {
136+ intoLayer(" spring-boot-loader" ) {
137+ include(" org/springframework/boot/loader/**" )
138+ }
139+ intoLayer(" application" )
140+ }
141+ dependencies {
142+ intoLayer(" application" ) {
143+ includeProjectDependencies()
144+ }
145+ intoLayer(" snapshot-dependencies" ) {
146+ include(" *:*:*SNAPSHOT" )
147+ }
148+ intoLayer(" dependencies" )
149+ }
150+ layerOrder.set(listOf (" dependencies" , " spring-boot-loader" , " snapshot-dependencies" , " application" ))
151+ }
152+ archiveFileName.set(" ${project.name} .${archiveExtension.get()} " )
153+ }
154+
155+ bootBuildImage {
156+ environment.put(" BP_JVM_VERSION" , " 21" )
157+ environment.put(" BPE_DELIM_JAVA_TOOL_OPTIONS" , " " )
158+ environment.put(
159+ " BPE_APPEND_JAVA_TOOL_OPTIONS" ,
160+ " -XX:MetaspaceSize=128M -XX:MaxMetaspaceSize=256M -XX:+UseG1GC -XX:+UseStringDeduplication -Dfile.encoding=UTF-8 -Duser.timezone=UTC"
161+ )
162+ imageName.set(" web-budget/${project.name} :v${project.version} " )
163+ }
137164}
138165
139166springBoot {
0 commit comments