Gradle: Support installation of JDK version requested by Gradle Daemon JVM Discovery #30165
Labels
manager:gradle
Gradle package manager
manager:gradle-wrapper
priority-3-medium
Default priority, "should be done" but isn't prioritised ahead of others
type:feature
Feature (new functionality)
Discussed in #30164
Originally posted by davidburstrom July 13, 2024
What would you like help with?
Other
How are you running Renovate?
Mend Renovate hosted app on github.com
If you're self-hosting Renovate, tell us which platform (GitHub, GitLab, etc) and which version of Renovate.
No response
Please tell us more about your question or problem
The JDK that gets installed in order to run Gradle is resolved by Renovate based on the Gradle version in use (source). There is a new Gradle feature, Daemon JVM discovery, that dictates which (installed) JDK the daemon should be launched with.
By inspecting the
gradle/gradle-daemon-jvm.properties
file (if present), Renovate can resolve which JDK version it should install.The reason I discovered this was because the job to update the Gradle wrapper (davidburstrom/contester#111) failed to run
./gradlew :wrapper
, and while investigating the job logs, I found that it installed JDK 17 whereas Gradle requested JDK 21.JDK selection is necessary to support cases where any applied Gradle plugins require a more modern JDK than Gradle itself requires.
Logs (if relevant)
Logs
The text was updated successfully, but these errors were encountered: