Skip to content

Commit 1d396ab

Browse files
committed
Fix bootBuildImage integration tests on Java 13
We build with Java 8, 11, and 13 without specifying target compatibility for the bytecode of the app that's placed in the image. The built image uses Java 11 and when the app is built with Java 13 it fails to start as the Java 11 VM can't read that Java 13 bytecode. This commit configures the app that's placed in the image to be built with target compatibility of 1.8. This allows it to be compiled with all version of Java with which we build and to also be compatible with the JVM that's in the image. See gh-19831
1 parent fccc241 commit 1d396ab

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

spring-boot-project/spring-boot-tools/spring-boot-gradle-plugin/src/test/resources/org/springframework/boot/gradle/tasks/bundling/BootBuildImageIntegrationTests.gradle

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,6 @@ plugins {
22
id 'java'
33
id 'org.springframework.boot' version '{version}'
44
}
5+
6+
sourceCompatibility = '1.8'
7+
targetCompatibility = '1.8'

0 commit comments

Comments
 (0)