gradle icon indicating copy to clipboard operation
gradle copied to clipboard

Report JVM information for Gradle daemon

Open big-guy opened this issue 1 year ago • 0 comments

Expected Behavior

It should be easy to understand which version of Java may be used to run a build.

Current Behavior (optional)

No response

Context

gradle -v reports the current JVM used. This is often the same one used by the daemon, but this can be influenced by two different things:

  • org.gradle.java.home can specify a completely different Java home to be used by the daemon
  • Daemon JVM criteria

Additionally, once the build is started, there is no easy way to see the actual JVM used to run the build. This is useful for diagnosing problems caused by running a build with the wrong (or unexpected) version of Java.

Some suggestions:

  • Make gradle -v report the value of org.gradle.java.home or the JVM criteria when set.
  • Make gradle buildEnvironment or similar task report information about the build's actual JVM

big-guy avatar May 10 '24 21:05 big-guy