keeganwitt / docker-gradle

Docker images with Gradle
https://hub.docker.com/_/gradle/
Apache License 2.0
143 stars 73 forks source link

Java v22 images #276

Closed donalmurtagh closed 5 months ago

donalmurtagh commented 5 months ago

Could we get images for Java v22? Adoptium have already released v22 builds for most platforms.

The easiest way to download the v22 builds is via the Adoptium API

donalmurtagh commented 5 months ago

I noticed that images are only made available for LTS Java version (v8, v11, v17, v21). If that's the policy, then I guess this issue should be closed.

keeganwitt commented 5 months ago

That's just because the last current version was no longer supported, so I stopped publishing that image. Java 22 is on my to do list. I should have a PR up soon.

keeganwitt commented 5 months ago

https://github.com/keeganwitt/docker-gradle/pull/277

keeganwitt commented 5 months ago

It looks like the Adoptium images haven't been published to Docker Hub yet. I'll have to wait for that to happen.

keeganwitt commented 5 months ago

Actually, another problem we have is that Gradle doesn't yet support Java 22 for execution. So we'd need an image with both Java 21 to launch Gradle and Java 22 to use in a toolchain. Is that something that would be useful?

This is similar to the problem we've had with the last several Java releases: Gradle's support lags their release (partly due to support by Kotlin which they require for buildscript support). See links below for more information.

keeganwitt commented 5 months ago

What sucks is, unlike the proposal to have Java 17 and 21 in the same image, Java 22 is only supported until September of this year, so then the image will cease to receive updates because the upstream image will cease to get updates, then we need to make a new image with Java 21 and 23.

donalmurtagh commented 5 months ago

Actually, another problem we have is that Gradle doesn't yet support Java 22 for execution. So we'd need an image with both Java 21 to launch Gradle and Java 22 to use in a toolchain. Is that something that would be useful?

Yes!

If it's the case that the lack of JDK22 support will only affect those using a Kotlin buildscript, would there be any value in releasing a Gradle-JDK22 image for Gradle users that use a Groovy buildscript?

keeganwitt commented 5 months ago

Actually, another problem we have is that Gradle doesn't yet support Java 22 for execution. So we'd need an image with both Java 21 to launch Gradle and Java 22 to use in a toolchain. Is that something that would be useful?

Yes!

If it's the case that the lack of JDK22 support will only affect those using a Kotlin buildscript, would there be any value in releasing a Gradle-JDK22 image for Gradle users that use a Groovy buildscript?

It's my understanding it should only affect Kotlin buildscript users, but I'm trying to align this image with the policy of upstream Gradle. They say they don't support launching Gradle from Java 22, so I'm not going to either. I think the only path that keeps things the way the ly support is that joint JDK image idea.

donalmurtagh commented 5 months ago

@keeganwitt should I expect to see something here, or is this still in progress?

keeganwitt commented 5 months ago

Still in progress (#283 will create images with both Java 21 and 22).

keeganwitt commented 5 months ago

Official images PR: https://github.com/docker-library/official-images/pull/16550

donalmurtagh commented 4 months ago

Official images PR: docker-library/official-images#16550

@keeganwitt Presumably, we have to wait until this PR is reviewed/merged before the new images are available on dockerhub?

keeganwitt commented 4 months ago

Official images PR: docker-library/official-images#16550

@keeganwitt Presumably, we have to wait until this PR is reviewed/merged before the new images are available on dockerhub?

Yes, that's correct.