Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use the incubating JVM toolchain feature to run Gradle daemon #343

Open
wants to merge 1 commit into
base: trunk
Choose a base branch
from

Conversation

hfhbd
Copy link
Contributor

@hfhbd hfhbd commented Jul 21, 2024

There is a new feature from Gradle 8.8 to use the jvm toolchain feature for the daemon: https://docs.gradle.org/current/userguide/gradle_daemon.html#sec:daemon_jvm_criteria

And why do we use 21 in builds, but 11 in releases?

@JakeWharton
Copy link
Collaborator

The build JDK should always be the newest. The source and target bytecode version should be the minimum supported version. Toolchains should only be used for testing on old JDKs or running tools that don't work on modern JDKs.

@hfhbd
Copy link
Contributor Author

hfhbd commented Jul 21, 2024

This feature is about the JVM used by the daemon itself, not about the JVM used for compiling, although without specifying the compiling tasks, it's the same JVM, but we do specify the compiler options.

@JakeWharton
Copy link
Collaborator

Yeah but then this forces the use of JDK 11 which is ancient. I should be able to use any JDK from 11-22. 22 is my default, and anything that uses a toolchain, aside from for testing purposes, will waste my disk space and RAM for worse performance.

@hfhbd
Copy link
Contributor Author

hfhbd commented Jul 21, 2024

We can also use 22, but we already use the toolchains feature for compiling with Java 11 and for testing with Java 20

If you want to drop toolchains for compiling, we also should add test with JVM 11.

@JakeWharton
Copy link
Collaborator

That would be my preference. One should be able to compile on any JDK newer than or equal to our minimum, and we should be testing on the latest + the minimum... uh... at minimum.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants