gradle-docker-plugin icon indicating copy to clipboard operation
gradle-docker-plugin copied to clipboard

When can I support JDK24?

Open x-horizon opened this issue 8 months ago • 1 comments

x-horizon avatar Apr 27 '25 17:04 x-horizon

I have same issue with support for Java 24.

It can be easily reproduced by creating a demo project at https://start.spring.io with Java 24.

After adding the plugin to the build.gradle file

plugins {
	id 'java'
	id 'org.springframework.boot' version '3.5.3'
	id 'io.spring.dependency-management' version '1.1.7'
	id 'com.bmuschko.docker-spring-boot-application' version '9.4.0' // <-- THE PLUGIN !!!
}

group = 'com.example'
version = '0.0.1-SNAPSHOT'

java {
	toolchain {
		languageVersion = JavaLanguageVersion.of(24)
	}
}

repositories {
	mavenCentral()
}

dependencies {
	implementation 'org.springframework.boot:spring-boot-starter'
	developmentOnly 'org.springframework.boot:spring-boot-devtools'
	developmentOnly 'org.springframework.boot:spring-boot-docker-compose'
	testImplementation 'org.springframework.boot:spring-boot-starter-test'
	testRuntimeOnly 'org.junit.platform:junit-platform-launcher'
}

tasks.named('test') {
	useJUnitPlatform()
}

I am getting following error:

Caused by: java.lang.IllegalArgumentException: Unsupported class file major version 68
        at com.bmuschko.gradle.docker.shaded.org.objectweb.asm.ClassReader.<init>(ClassReader.java:200)
        at com.bmuschko.gradle.docker.shaded.org.objectweb.asm.ClassReader.<init>(ClassReader.java:180)

Of course it work fine when I switch it to Java 17.

Is there going to be a support for Java 24?

zalio-pl avatar Jun 23 '25 09:06 zalio-pl

I'd like to put this on the radar again, because we've got a new LTS release with Java 25. I'm blocked from upgrading our projects due to above error (with the slight change that we're now talking about class file major version 69).

Chessray avatar Oct 30 '25 17:10 Chessray

Released with version 10.0.0 of the plugin.

bmuschko avatar Oct 30 '25 19:10 bmuschko