1+ buildscript {
2+ dependencies {
3+ classpath " com.google.cloud.tools:jib-spring-boot-extension-gradle:0.1.0"
4+ }
5+ }
6+
17plugins {
28 id " java"
39 id " groovy"
410 id " idea"
511 id " org.springframework.boot" version " ${ springBootVersion} "
6- id " com.google.cloud.tools.jib" version " 3.3 .2"
12+ id " com.google.cloud.tools.jib" version " 3.4 .2"
713 id " com.diffplug.spotless" version " ${ spotlessVersion} "
814}
915
@@ -45,9 +51,9 @@ spotless {
4551 lineEndings " UNIX"
4652}
4753
48- sourceCompatibility = " 17 "
54+ sourceCompatibility = " 21 "
4955[compileJava, compileTestJava, compileGroovy, compileTestGroovy]* . options* . encoding = " UTF-8"
50- [compileJava, compileTestJava, compileGroovy, compileTestGroovy]* . options* . compilerArgs = [" --enable-preview " , " -Xlint:all" ]
56+ [compileJava, compileTestJava, compileGroovy, compileTestGroovy]* . options* . compilerArgs = [" -Adoma.metamodel.enabled=true " , " -parameters " , " -Xlint:all" ]
5157
5258dependencyManagement {
5359 imports {
@@ -72,7 +78,6 @@ dependencies {
7278 implementation " org.springframework.integration:spring-integration-jdbc"
7379 developmentOnly " org.springframework.boot:spring-boot-docker-compose"
7480
75-
7681 implementation " org.flywaydb:flyway-core"
7782 implementation " org.flywaydb:flyway-mysql"
7883 runtimeOnly " com.mysql:mysql-connector-j"
@@ -95,8 +100,13 @@ dependencies {
95100}
96101
97102jib {
103+ pluginExtensions {
104+ pluginExtension {
105+ implementation = " com.google.cloud.tools.jib.gradle.extension.springboot.JibSpringBootExtension"
106+ }
107+ }
98108 from {
99- image = " amazoncorretto:17 "
109+ image = " public.ecr.aws/ amazoncorretto/amazoncorretto:21 "
100110 }
101111 container {
102112 jvmFlags = [
@@ -115,7 +125,12 @@ tasks.named("test") {
115125 useJUnitPlatform()
116126 testLogging {
117127 events " passed" , " skipped" , " failed"
128+ exceptionFormat = " full"
129+ showCauses = true
130+ showExceptions = true
131+ showStackTraces = true
118132 }
133+ systemProperty " spring.profiles.active" , " test"
119134}
120135
121136compileJava. dependsOn " spotlessApply"
0 commit comments