keeganwitt / docker-gradle

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

Add images with both Java 17 and 21 #265

Closed keeganwitt closed 6 months ago

keeganwitt commented 1 year ago

Copying ideas from #248 to create an image with both Java 17 and 21 to work around the fact Gradle doesn't support Java 21 yet.

The latest (8.4) release notes say

Gradle now supports using Java 21 for compiling, testing, and starting other Java programs. This can be accomplished by configuring your build or task to use a Java 21 toolchain.

You cannot currently run Gradle on Java 21 because Kotlin lacks support for JDK 21. However, you can expect support for running Gradle with Java 21 in a future version.

They also note this in their compatibility guide. This is why Java 21 images aren't published to Docker Hub.

keeganwitt commented 6 months ago

Java 21 is supported by Gradle 8.5 and later.